aboutsummaryrefslogtreecommitdiff
path: root/editors/patch.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-30 16:41:15 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-30 16:41:15 +0000
commit611f3bd96a89fbb13e082913d263849da4d18488 (patch)
tree2646cfd66b5a8d279ad360aaa989a814eeecfd64 /editors/patch.c
parent2e289b23747dc06d3701ca019380c0253f215cfe (diff)
downloadbusybox-w32-611f3bd96a89fbb13e082913d263849da4d18488.tar.gz
busybox-w32-611f3bd96a89fbb13e082913d263849da4d18488.tar.bz2
busybox-w32-611f3bd96a89fbb13e082913d263849da4d18488.zip
passwd: rework:
* do not make backup copy by copying (just retain old file) * correctly fall back to /etc/passwd if user is not in shadow * fix bug with overlong passwd entries * be permissive on some kinds of failures * reduce stack usage * code size: -500 bytes git-svn-id: svn://busybox.net/trunk/busybox@16739 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors/patch.c')
-rw-r--r--editors/patch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/editors/patch.c b/editors/patch.c
index f11f8a1a2..8e885d06e 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -117,12 +117,14 @@ int patch_main(int argc, char **argv)
117 free(patch_line); 117 free(patch_line);
118 patch_line = xmalloc_fgets(patch_file); 118 patch_line = xmalloc_fgets(patch_file);
119 } 119 }
120 /* FIXME: patch_line NULL check?? */
120 121
121 /* Extract the filename used before the patch was generated */ 122 /* Extract the filename used before the patch was generated */
122 original_filename = extract_filename(patch_line, patch_level); 123 original_filename = extract_filename(patch_line, patch_level);
123 free(patch_line); 124 free(patch_line);
124 125
125 patch_line = xmalloc_fgets(patch_file); 126 patch_line = xmalloc_fgets(patch_file);
127 /* FIXME: NULL check?? */
126 if (strncmp(patch_line, "+++ ", 4) != 0) { 128 if (strncmp(patch_line, "+++ ", 4) != 0) {
127 ret = 2; 129 ret = 2;
128 bb_error_msg("invalid patch"); 130 bb_error_msg("invalid patch");