]> www.fi.muni.cz Git - evince.git/blobdiff - backend/impress/iksemel.c
Updated Brazilian translation.
[evince.git] / backend / impress / iksemel.c
index 91edcb3ebfbde6f02e8d11341b1ab5aa2171c551..9908e132e3037e4ed6630aba0170a41c52f0fc6b 100644 (file)
@@ -761,11 +761,11 @@ sax_core (iksparser *prs, char *buf, int len)
                                        if (prs->attcur >= (prs->attmax * 2)) {
                                                void *tmp;
                                                prs->attmax += 12;
                                        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;
                                                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);
                                                memcpy (tmp, prs->atts, sizeof(char *) * prs->attcur);
-                                               free (prs->atts);
+                                               iks_free (prs->atts);
                                                prs->atts = tmp;
                                        }
                                }
                                                prs->atts = tmp;
                                        }
                                }