diff options
author | CoprDistGit <infra@openeuler.org> | 2024-07-15 09:13:36 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-07-15 09:13:36 +0000 |
commit | 87f2d52ac49f8e54d25a6bfcada2747381dcda3c (patch) | |
tree | 3700124d2256f460e93567fa6f3cfa6ec0d44787 /fix-str_open.patch | |
parent | 908f6497506278a654656b2ed78b9cf08a892218 (diff) |
automatic import of vsftpdopeneuler22.03_LTS_SP2openeuler22.03_LTS
Diffstat (limited to 'fix-str_open.patch')
-rw-r--r-- | fix-str_open.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fix-str_open.patch b/fix-str_open.patch new file mode 100644 index 0000000..0c17d23 --- /dev/null +++ b/fix-str_open.patch @@ -0,0 +1,28 @@ +diff -ruN vsftpd-3.0.3.orig/sysstr.c vsftpd-3.0.3/sysstr.c +--- vsftpd-3.0.3.orig/sysstr.c 2020-11-17 09:47:03.872923383 +0100 ++++ vsftpd-3.0.3/sysstr.c 2020-11-17 09:48:41.219754145 +0100 +@@ -74,19 +74,11 @@ + int + str_open(const struct mystr* p_str, const enum EVSFSysStrOpenMode mode) + { +- enum EVSFSysUtilOpenMode open_mode = kVSFSysUtilOpenUnknown; +- switch (mode) +- { +- case kVSFSysStrOpenReadOnly: +- open_mode = kVSFSysUtilOpenReadOnly; +- break; +- case kVSFSysStrOpenUnknown: +- /* Fall through */ +- default: +- bug("unknown mode value in str_open"); +- break; +- } +- return vsf_sysutil_open_file(str_getbuf(p_str), open_mode); ++ if (mode == kVSFSysStrOpenReadOnly) ++ return vsf_sysutil_open_file(str_getbuf(p_str), kVSFSysUtilOpenReadOnly); ++ ++ bug("unknown mode value in str_open"); ++ return -1; + } + + int |