git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 'unknown filesystem' warnings in old inspection code (RHBZ#678231 RHBZ#666578).
[libguestfs.git]
/
daemon
/
strings.c
diff --git
a/daemon/strings.c
b/daemon/strings.c
index
1ba0241
..
f08401b
100644
(file)
--- a/
daemon/strings.c
+++ b/
daemon/strings.c
@@
-34,6
+34,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;
+ }
+
CHROOT_IN;
fd = open (path, O_RDONLY);
CHROOT_OUT;
CHROOT_IN;
fd = open (path, O_RDONLY);
CHROOT_OUT;