git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update BUGS.
[libguestfs.git]
/
daemon
/
strings.c
diff --git
a/daemon/strings.c
b/daemon/strings.c
index
4701716
..
778aea3
100644
(file)
--- a/
daemon/strings.c
+++ b/
daemon/strings.c
@@
-33,6
+33,12
@@
do_strings_e (const char *encoding, const char *path)
char *out, *err;
char **lines;
char *out, *err;
char **lines;
+ if (strlen (encoding) != 1 ||
+ strchr ("sSblBL", encoding[0]) == NULL) {
+ reply_with_error ("%s: invalid encoding", encoding);
+ return NULL;
+ }
+
buf = sysroot_path (path);
if (!buf) {
reply_with_perror ("malloc");
buf = sysroot_path (path);
if (!buf) {
reply_with_perror ("malloc");