projects
/
platform
/
upstream
/
neardal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d6bb89
)
Off-by-one memory access bugfix.
author
Oleg Zhurakivskyy
<oleg.zhurakivskyy@intel.com>
Fri, 29 Aug 2014 09:47:50 +0000
(12:47 +0300)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sun, 7 Sep 2014 22:40:51 +0000
(
00:40
+0200)
Terminate on endParsing before dereferencing argEnd.
ncl/ncl.c
patch
|
blob
|
history
diff --git
a/ncl/ncl.c
b/ncl/ncl.c
index
243fd59
..
bee639a
100644
(file)
--- a/
ncl/ncl.c
+++ b/
ncl/ncl.c
@@
-164,8
+164,7
@@
static NCLError ncl_prv_split_cmdLine(gchar *cmdLine, int *iArgc,
inQuotes = false;
argStart = argEnd = cmdLine;
- while ((*argc) < NB_MAX_PARAMETERS && *argEnd != '\0' &&
- endParsing == FALSE) {
+ while (endParsing == FALSE && *argc < NB_MAX_PARAMETERS && *argEnd) {
while (*argEnd != ' ' && *argEnd != '"' && *argEnd != '\0')
argEnd++;
if (*argEnd == '"') {