[php-i18n-commits] cvs commit: php4/ext/mbstring buffer.c

Back to archive index

Tsukada ttsuk****@users*****
2002年 5月 22日 (水) 05:38:04 JST


ttsukada    02/05/22 05:38:04

  Modified:    ext/mbstring buffer.c
  Log:
  MBFL update
  
  Revision  Changes    Path
  1.2       +6 -0      php4/ext/mbstring/buffer.c
  
  Index: buffer.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/buffer.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buffer.c	20 May 2002 11:15:54 -0000	1.1
  +++ buffer.c	21 May 2002 20:38:04 -0000	1.2
  @@ -402,6 +402,9 @@
   
   		if (buffer->memory_type_value == PHP_MB_MEMORY_TYPE_CONST) {
   			MBG(last_errno) = PHP_MB_ERR_BUFFER_OVER_FLOW;
  +			if (buffer->value != NULL) {
  +				buffer->value[buffer->size - 1] = 0;
  +			}
   			return FAILURE;
   		}
   		newsize = buffer->length + 1;
  @@ -413,6 +416,9 @@
   		}
   		if (tmp == NULL) {
   			MBG(last_errno) = PHP_MB_ERR_NO_MEMORY;
  +			if (buffer->value != NULL) {
  +				buffer->value[buffer->size - 1] = 0;
  +			}
   			return FAILURE;
   		}
   		buffer->size = newsize;
  
  
  



php-i18n-commits メーリングリストの案内
Back to archive index