aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-11 16:58:46 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-11 16:58:46 +0000
commit5f265b755a92e7efdbd0d18694913209dfd9e055 (patch)
treee6644e9f97dab0198ad771e1d330e02a7cce8553 /libbb
parent9d94deabd398634c6d1c601ba276f5afd97b2050 (diff)
downloadbusybox-5f265b755a92e7efdbd0d18694913209dfd9e055.tar.gz
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
Diffstat (limited to 'libbb')
-rw-r--r--libbb/libbb.h1
-rw-r--r--libbb/messages.c3
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;
extern const char * const write_error;
extern const char * const too_few_args;
extern const char * const name_longer_than_foo;
+extern const char * const unknown;
#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 @@
#ifdef L_name_longer_than_foo
const char * const name_longer_than_foo = "Names longer than %d chars not supported.";
#endif
+#ifdef L_unknown
+ const char * const unknown = "(unknown)";
+#endif