From 69392daac575cc29f9f3bf8f7369fae52f3fadf0 Mon Sep 17 00:00:00 2001 From: Benoit DOLEZ Date: Thu, 15 Dec 2016 00:16:27 +0100 Subject: [PATCH] parseNameValue: fix no quoting support Function description announce support of quoted variable : - name=value - name="value" - name='value' ... but there is nothing in the code to really support quoted string. I had small fixes to support it. My tests : $ cat > test.txt <strLen && !isspace(npb->str[i])) + while(i < npb->strLen && + ((quoting && npb->str[i] != quoting) || (!quoting && !isspace(npb->str[i])))) ++i; const size_t lenVal = i - iVal; + if (i < npb->strLen && npb->str[i] == quoting) + ++i; + else if (quoting) + goto done; + /* parsing OK */ *offs = i; r = 0;