Integrate cesanta/mongoose-os/pull/370

PUBLISHED_FROM=5bee629477514370f9b670771e786c4f4ddae934
This commit is contained in:
Бобби authored and Cesanta Bot committed 2017-11-09 09:49:28 +00:00
1 parent 00d1d2c0e7
commit a197646867
1 file changed
+2 -1
+2 -1
View File
@@ -7015,6 +7015,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
* -1 - src is wrong (NUUL)
* -2 - dst is wrong (NULL)
* -3 - failed to decode url or dst is to small
* -4 - name does not exist
*/
if (dst == NULL || dst_len == 0) {
len = -2;
@@ -7024,7 +7025,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
} else {
name_len = strlen(name);
e = buf->p + buf->len;
len = 0;
len = -4;
dst[0] = '\0';
for (p = buf->p; p + name_len < e; p++) {