projects
/
sdk
/
target
/
sdbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab5f654
)
Fixed a buffer underflow which could happen during processing sdb shell command.
88/89388/1
author
shingil.kang
<shingil.kang@samsung.com>
Fri, 23 Sep 2016 08:50:37 +0000
(17:50 +0900)
committer
shingil.kang
<shingil.kang@samsung.com>
Fri, 23 Sep 2016 08:55:49 +0000
(17:55 +0900)
Change-Id: I0faa48855632d00e18b9e054b4f83e786b24bdd9
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
src/services.c
patch
|
blob
|
history
diff --git
a/src/services.c
b/src/services.c
index
2fbcaa7
..
64cc80b
100644
(file)
--- a/
src/services.c
+++ b/
src/services.c
@@
-563,7
+563,7
@@
static void get_env(char *key, char **env)
e = buf + (strlen(buf) - 1);
// trim string
- while(
*e == ' ' || *e == '\n' || *e == '\t'
) {
+ while(
(e > s) && (*e == ' ' || *e == '\n' || *e == '\t')
) {
e--;
}
*(e+1) ='\0';