projects
/
framework
/
security
/
smack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cece05
)
libsmack: fix a bug in validation of labels
author
José Bollo
<jose.bollo@open.eurogiciel.org>
Tue, 17 Dec 2013 12:25:47 +0000
(13:25 +0100)
committer
Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com>
Wed, 18 Dec 2013 19:00:00 +0000
(21:00 +0200)
The function `get_label` didn't handle the characters below
' ' and above '~' correctly.
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
libsmack/libsmack.c
patch
|
blob
|
history
diff --git
a/libsmack/libsmack.c
b/libsmack/libsmack.c
index
a8672b6
..
913f04c
100644
(file)
--- a/
libsmack/libsmack.c
+++ b/
libsmack/libsmack.c
@@
-737,8
+737,9
@@
static inline ssize_t get_label(char *dest, const char *src)
return -1;
for (i = 0; i < (SMACK_LABEL_LEN + 1) && src[i]; i++) {
+ if (src[i] <= ' ' || src[i] > '~')
+ return -1;
switch (src[i]) {
- case ' ':
case '/':
case '"':
case '\\':