diff options
author | Daniel Martin <consume.noise@gmail.com> | 2017-10-27 16:11:53 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-12-13 10:05:36 -0500 |
commit | e8530b872aa4b1648bba7fb3dddaf9abf70100ed (patch) | |
tree | 0741611a8a377beaf552de5464c834bd7372df08 /include | |
parent | 4ef1aef0fbbf47c937cf421f0180cc18fc23a03e (diff) |
modesetting: Fix potential buffer overflow
If one misconfigures a ZaphodHeads value (more than 20 characters
without a delimiter), we get an overflow of our buffer. Use
xstrtokenize() instead of writing/fixing our own tokenizer.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
(cherry picked from commit 04a305121fbc08ecc2ef345ee7155d6087a43fd1)
Diffstat (limited to 'include')
-rw-r--r-- | include/misc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/misc.h b/include/misc.h index 01747fd38..2dedf6d63 100644 --- a/include/misc.h +++ b/include/misc.h @@ -248,7 +248,7 @@ padding_for_int32(const int bytes) } -extern char **xstrtokenize(const char *str, const char *separators); +extern _X_EXPORT char **xstrtokenize(const char *str, const char *separators); extern void FormatInt64(int64_t num, char *string); extern void FormatUInt64(uint64_t num, char *string); extern void FormatUInt64Hex(uint64_t num, char *string); |