Unverified Commit 22823e90 authored by Mouse's avatar Mouse Committed by GitHub

Merge pull request #147 from v0-e/jer-os-allow-empty

jer: OCTET STRING allow empty
parents bc7f333f d7d3ed8a
......@@ -200,19 +200,18 @@ static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_b
int half = 0; /* Half bit */
uint8_t *buf;
/* Strip quotes */
for (; p < pend; ++p) {
if (*p == CQUOTE)
if (*p == CQUOTE) {
++p;
break;
}
}
++p;
for (; pend > p; --pend) {
for (; pend >= p; --pend) {
if (*pend == CQUOTE)
break;
}
if (pend - p < 2) return -1;
if (pend - p < 0) return -1;
chunk_size = pend - p;
/* Reallocate buffer according to high cap estimation */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment