cvs: /php4/sapi/servlet servlet.c

From: Date: Sun, 20 Feb 2000 13:44:21 +0000
Subject: cvs: /php4/sapi/servlet servlet.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10519@lists.php.net to get a copy of this message
rubys Sun Feb 20 05:44:21 2000 EDT Modified files: /php4/sapi/servlet servlet.c Log: Potential trap when cookies are sent Index: php4/sapi/servlet/servlet.c diff -u php4/sapi/servlet/servlet.c:1.20 php4/sapi/servlet/servlet.c:1.21 --- php4/sapi/servlet/servlet.c:1.20 Sat Feb 19 15:41:26 2000 +++ php4/sapi/servlet/servlet.c Sun Feb 20 05:43:50 2000 @@ -181,7 +181,8 @@ uint read_bytes=(*jenv)->GetStringLength(jenv, post); if (read_bytes>count_bytes) read_bytes=count_bytes; - memcpy(buffer, postAsUTF, count_bytes); + memcpy(buffer, postAsUTF, read_bytes); + if (read_bytes<count_bytes) buffer[read_bytes]=0; (*jenv)->ReleaseStringUTFChars(jenv, post, postAsUTF);

« previous php.version4 (#10519) next »