diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2010-08-26 20:22:28 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2010-08-26 20:22:28 +0000 |
commit | 6d5dfbffb30adc442c9e0d03a3b0db1af56d6827 (patch) | |
tree | 0231aa2c0a519df011f6903c187b16317fa77341 /print.c | |
parent | 63fc078fed67856c3a25a898616039cfd0981645 (diff) |
Check input string in ps_clean_string().
This fixes bug 5148.
svn path=/trunk/; revision=33941
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -939,6 +939,11 @@ void ps_clean_string(unsigned char *out, const unsigned char *in, int rd, wr; char c; + if (in == NULL) { + out[0] = '\0'; + return; + } + for (rd = 0, wr = 0 ; wr < outbuf_size; rd++, wr++ ) { c = in[rd]; switch (c) { |