X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fimpress%2Fiksemel.c;h=9908e132e3037e4ed6630aba0170a41c52f0fc6b;hb=3d3c4a5a08f1b8b536542735110c1376fb3e30bf;hp=91edcb3ebfbde6f02e8d11341b1ab5aa2171c551;hpb=1af6600934d1f723e5b492b8322e52a1144fb0af;p=evince.git diff --git a/backend/impress/iksemel.c b/backend/impress/iksemel.c index 91edcb3e..9908e132 100644 --- a/backend/impress/iksemel.c +++ b/backend/impress/iksemel.c @@ -761,11 +761,11 @@ sax_core (iksparser *prs, char *buf, int len) if (prs->attcur >= (prs->attmax * 2)) { void *tmp; prs->attmax += 12; - tmp = iks_malloc (sizeof(char *) * 2 * prs->attmax); + tmp = iks_malloc (sizeof(char *) * (2 * prs->attmax + 1)); if (!tmp) return IKS_NOMEM; - memset (tmp, 0, sizeof(char *) * 2 * prs->attmax); + memset (tmp, 0, sizeof(char *) * (2 * prs->attmax + 1)); memcpy (tmp, prs->atts, sizeof(char *) * prs->attcur); - free (prs->atts); + iks_free (prs->atts); prs->atts = tmp; } }