@@ -321,8 +321,6 @@ static uint8_t hexToInt( char c )
321321 *
322322 * @return true if a valid escape sequence was present;
323323 * false otherwise.
324- *
325- * @note For the sake of security, \u0000 is disallowed.
326324 */
327325static bool skipOneHexEscape ( const char * buf ,
328326 size_t * start ,
@@ -358,7 +356,7 @@ static bool skipOneHexEscape( const char * buf,
358356 }
359357 }
360358
361- if ( ( i == end ) && ( value > 0U ) )
359+ if ( i == end )
362360 {
363361 ret = true;
364362 * outValue = value ;
@@ -382,8 +380,6 @@ static bool skipOneHexEscape( const char * buf,
382380 *
383381 * @return true if a valid escape sequence was present;
384382 * false otherwise.
385- *
386- * @note For the sake of security, \u0000 is disallowed.
387383 */
388384#define isHighSurrogate ( x ) ( ( ( x ) >= 0xD800U ) && ( ( x ) <= 0xDBFFU ) )
389385#define isLowSurrogate ( x ) ( ( ( x ) >= 0xDC00U ) && ( ( x ) <= 0xDFFFU ) )
@@ -437,8 +433,6 @@ static bool skipHexEscape( const char * buf,
437433 *
438434 * @return true if a valid escape sequence was present;
439435 * false otherwise.
440- *
441- * @note For the sake of security, \NUL is disallowed.
442436 */
443437static bool skipEscape ( const char * buf ,
444438 size_t * start ,
@@ -457,9 +451,6 @@ static bool skipEscape( const char * buf,
457451
458452 switch ( c )
459453 {
460- case '\0' :
461- break ;
462-
463454 case 'u' :
464455 ret = skipHexEscape ( buf , & i , max );
465456 break ;
0 commit comments