diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-11 16:58:46 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-11 16:58:46 +0000 |
commit | 8ff167e7105b330d069ffff351be3eae1df337e8 (patch) | |
tree | e6644e9f97dab0198ad771e1d330e02a7cce8553 /libbb | |
parent | cbdc734b320c0cde4ca3b25d15add9c6153eb7df (diff) | |
download | busybox-w32-8ff167e7105b330d069ffff351be3eae1df337e8.tar.gz busybox-w32-8ff167e7105b330d069ffff351be3eae1df337e8.tar.bz2 busybox-w32-8ff167e7105b330d069ffff351be3eae1df337e8.zip |
Fix a segfault in lash, hush, and cmdedit. Each of these used
xgetcwd, but did not check the return for a NULL, and then continued
to call strlen on the NULL when the cwd had been removed from under it.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@2613 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/libbb.h | 1 | ||||
-rw-r--r-- | libbb/messages.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libbb/libbb.h b/libbb/libbb.h index 21af5688a..fde58b0a6 100644 --- a/libbb/libbb.h +++ b/libbb/libbb.h | |||
@@ -282,5 +282,6 @@ extern const char * const dash_dash_help; | |||
282 | extern const char * const write_error; | 282 | extern const char * const write_error; |
283 | extern const char * const too_few_args; | 283 | extern const char * const too_few_args; |
284 | extern const char * const name_longer_than_foo; | 284 | extern const char * const name_longer_than_foo; |
285 | extern const char * const unknown; | ||
285 | 286 | ||
286 | #endif /* __LIBBB_H__ */ | 287 | #endif /* __LIBBB_H__ */ |
diff --git a/libbb/messages.c b/libbb/messages.c index 99c2bc9d5..910cb8fa2 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -58,4 +58,7 @@ | |||
58 | #ifdef L_name_longer_than_foo | 58 | #ifdef L_name_longer_than_foo |
59 | const char * const name_longer_than_foo = "Names longer than %d chars not supported."; | 59 | const char * const name_longer_than_foo = "Names longer than %d chars not supported."; |
60 | #endif | 60 | #endif |
61 | #ifdef L_unknown | ||
62 | const char * const unknown = "(unknown)"; | ||
63 | #endif | ||
61 | 64 | ||