diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-05-17 22:26:34 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-17 22:28:32 +0100 |
commit | 0a2082d77792087f8c4afff5b73f5efdfdd1b2ba (patch) | |
tree | 50b1549638729eb53893aa5e2bd9c55c2c570d60 /riscos/gui.c | |
parent | 7ba459f1b5851b9bd41aaf44e99065300605a13d (diff) | |
download | netsurf-0a2082d77792087f8c4afff5b73f5efdfdd1b2ba.tar.gz netsurf-0a2082d77792087f8c4afff5b73f5efdfdd1b2ba.tar.bz2 |
ensure all vmkpath implementations check their parameters
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index 9ee56e685..7ed8ae5c2 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -2334,6 +2334,10 @@ static nserror riscos_mkpath(char **str, size_t *size, size_t nelm, va_list ap) */ for (elm_idx = 0; elm_idx < nelm; elm_idx++) { elm[elm_idx] = va_arg(ap, const char *); + /* check the argument is not NULL */ + if (elm[elm_idx] == NULL) { + return NSERROR_BAD_PARAMETER; + } elm_len[elm_idx] = strlen(elm[elm_idx]); fname_len += elm_len[elm_idx]; } |