diff options
| author | Sam Varshavchik | 2018-07-15 20:15:35 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2018-07-15 20:15:35 -0400 | 
| commit | 3fe758e75eca989576a6a8f58a9b4068452db02e (patch) | |
| tree | c32814acd5563b295f7e6eed630a8846e80f6f47 /unicode/unicode.c | |
| parent | 83b8a17c2dbb0feccc7c1c02d7d170ef84880126 (diff) | |
| download | courier-libs-3fe758e75eca989576a6a8f58a9b4068452db02e.tar.bz2 | |
courier-unicode: fix error and validation of modified-UTF7 encoding.
Diffstat (limited to 'unicode/unicode.c')
| -rw-r--r-- | unicode/unicode.c | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/unicode/unicode.c b/unicode/unicode.c index 82d5c21..e320f9f 100644 --- a/unicode/unicode.c +++ b/unicode/unicode.c @@ -623,11 +623,15 @@ struct unicode_convert_fromimaputf7 {  /* Flush the accumulated UCS-2 stream */  #define convert_fromutf7_flush(p) do {					\ -		(p)->errflag=(*(p)->hdr.next->convert_handler)		\ +		int rc=(*(p)->hdr.next->convert_handler)		\  			((p)->hdr.next->ptr,				\  			 (const char *)(p)->convbuf,			\  			 (p)->convbuf_cnt *				\  			 sizeof((p)->convbuf[0]));			\ +									\ +		if (rc)							\ +			(p)->errflag=rc;				\ +									\  		(p)->convbuf_cnt=0;					\  	} while (0) | 
