diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2010-05-19 14:42:52 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2010-05-19 14:42:52 +0000 |
commit | 05d695f8c6f7e3200bbfdb8383dcf2a1c40df2d5 (patch) | |
tree | 89950113e99bd5199715f83d37df3f8c91ea0cad /devel/cgilib/files | |
parent | ad5b61da8b01dde85b6c17ac4c8c206c75ab3462 (diff) | |
download | ports-05d695f8c6f7e3200bbfdb8383dcf2a1c40df2d5.tar.gz ports-05d695f8c6f7e3200bbfdb8383dcf2a1c40df2d5.zip |
Notes
Diffstat (limited to 'devel/cgilib/files')
-rw-r--r-- | devel/cgilib/files/patch-cgi.c | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/devel/cgilib/files/patch-cgi.c b/devel/cgilib/files/patch-cgi.c index 4b1ced92e1f3..65900f6a5e34 100644 --- a/devel/cgilib/files/patch-cgi.c +++ b/devel/cgilib/files/patch-cgi.c @@ -1,33 +1,11 @@ ---- cgi.c.orig 2008-05-03 09:51:51.000000000 -0700 -+++ cgi.c 2008-05-03 09:52:40.000000000 -0700 -@@ -227,6 +227,30 @@ - return strdup (template); - } - -+ -+size_t -+strnlen(const char *s, size_t len) -+{ -+ size_t i; -+ -+ for(i = 0; i < len && s[i]; i++) -+ ; -+ return i; -+} -+ -+char * -+strndup(const char *old, size_t sz) -+{ -+ size_t len = strnlen (old, sz); -+ char *t = malloc(len + 1); -+ -+ if (t != NULL) { -+ memcpy (t, old, len); -+ t[len] = '\0'; -+ } -+ return t; -+} -+ - /* cgiReadMultipart() - * - * Decode multipart/form-data +--- cgi.c.orig 2010-05-19 18:38:27.000000000 +0400 ++++ cgi.c 2010-05-19 18:38:55.000000000 +0400 +@@ -641,7 +641,7 @@ s_cgi *cgiReadVariables () + free (result[k]->value); + free (value); + result[k]->value = sptr; +- cgiDebugOutput (1, "%s: %s", result[i]->name, result[i]->value); ++ cgiDebugOutput (1, "%s: %s", result[k]->name, result[k]->value); + } + } + cp = ++ip; |