summaryrefslogtreecommitdiffstats
path: root/encoding
diff options
context:
space:
mode:
Diffstat (limited to 'encoding')
-rw-r--r--encoding/apr_escape.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/encoding/apr_escape.c b/encoding/apr_escape.c
index 6074d73..461eef8 100644
--- a/encoding/apr_escape.c
+++ b/encoding/apr_escape.c
@@ -571,7 +571,7 @@ APR_DECLARE(apr_status_t) apr_escape_entity(char *escaped, const char *str,
found = 1;
}
else if (toasc && !apr_isascii(c)) {
- int offset = apr_snprintf((char *) d, 6, "&#%3.3d;", c);
+ int offset = apr_snprintf((char *) d, 7, "&#%3.3d;", c);
size += offset;
d += offset;
found = 1;
@@ -613,8 +613,7 @@ APR_DECLARE(apr_status_t) apr_escape_entity(char *escaped, const char *str,
found = 1;
}
else if (toasc && !apr_isascii(c)) {
- char buf[8];
- size += apr_snprintf(buf, 6, "&#%3.3d;", c);
+ size += apr_snprintf(NULL, 0, "&#%3.3d;", c);
found = 1;
}
else {