diff options
Diffstat (limited to 'src/microhttpd/postprocessor.c')
-rw-r--r-- | src/microhttpd/postprocessor.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c index 74f50af5..abe7b437 100644 --- a/src/microhttpd/postprocessor.c +++ b/src/microhttpd/postprocessor.c | |||
@@ -385,11 +385,14 @@ process_value (struct MHD_PostProcessor *pp, | |||
385 | if (delta > XBUF_SIZE - xoff) | 385 | if (delta > XBUF_SIZE - xoff) |
386 | delta = XBUF_SIZE - xoff; | 386 | delta = XBUF_SIZE - xoff; |
387 | /* move (additional) input into processing buffer */ | 387 | /* move (additional) input into processing buffer */ |
388 | memcpy (&xbuf[xoff], | 388 | if (0 != delta) |
389 | value_start, | 389 | { |
390 | delta); | 390 | memcpy (&xbuf[xoff], |
391 | xoff += delta; | 391 | value_start, |
392 | value_start += delta; | 392 | delta); |
393 | xoff += delta; | ||
394 | value_start += delta; | ||
395 | } | ||
393 | /* find if escape sequence is at the end of the processing buffer; | 396 | /* find if escape sequence is at the end of the processing buffer; |
394 | if so, exclude those from processing (reduce delta to point at | 397 | if so, exclude those from processing (reduce delta to point at |
395 | end of processed region) */ | 398 | end of processed region) */ |