summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18acc41)
raw | patch | inline | side by side (parent: 18acc41)
author | Florian Forster <ff@octo.it> | |
Mon, 21 Jun 2010 08:40:29 +0000 (10:40 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 21 Jun 2010 08:40:29 +0000 (10:40 +0200) |
src/utils_cgi.c | patch | blob | history | |
src/utils_cgi.h | patch | blob | history |
diff --git a/src/utils_cgi.c b/src/utils_cgi.c
index 9efa01f72af575af7eb035b881517aa67d1f1cdb..fb9a1fb17079562f125be874ef27bad8b33f3aef 100644 (file)
--- a/src/utils_cgi.c
+++ b/src/utils_cgi.c
break;
}
- return (src);
+ return (dest);
} /* }}} char *html_escape_copy */
#undef COPY_ENTITY
{
char buffer[4096];
+ if (string == NULL)
+ return (NULL);
+
html_escape_copy (buffer, string, sizeof (buffer));
return (strdup (buffer));
diff --git a/src/utils_cgi.h b/src/utils_cgi.h
index b9b8c09c0109f4e585246a61f774c52295667298..3204b622511d10d6d4f42fcc389947fd3bb7e04d 100644 (file)
--- a/src/utils_cgi.h
+++ b/src/utils_cgi.h
char *html_escape_buffer (char *buffer, size_t buffer_size);
char *html_escape_copy (char *dest, const char *src, size_t n);
+/* vim: set sw=2 sts=2 et fdm=marker : */
#endif /* UTILS_CGI_H */