Allow escape/special character in string

Consider the case of PEM certificate.
This modification give it a chance to scan over those
escape characters. e.g.:
  '\t': 0x09
  '\n': 0x0A

Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
This commit is contained in:
Alamy Liu 2020-02-27 12:01:25 -08:00
parent fdb66f1037
commit 6d3025be56

View File

@ -130,7 +130,7 @@ static unsigned char getCharFromUnicode( unsigned char const* str ) {
static char* parseString( char* str ) {
unsigned char* head = (unsigned char*)str;
unsigned char* tail = (unsigned char*)str;
for( ; *head >= ' '; ++head, ++tail ) {
for( ; *head; ++head, ++tail ) {
if ( *head == '\"' ) {
*tail = '\0';
return (char*)++head;