]> www.fi.muni.cz Git - evince.git/blobdiff - backend/impress/iksemel.c
Updated Brazilian translation.
[evince.git] / backend / impress / iksemel.c
index 6d24d43a339b54bdf990efb11f188ad868aee8f3..9908e132e3037e4ed6630aba0170a41c52f0fc6b 100644 (file)
@@ -33,6 +33,7 @@
 ** modify it under the terms of GNU Lesser General Public License.
 */
 
 ** modify it under the terms of GNU Lesser General Public License.
 */
 
+#include <config.h>
 #include <errno.h>
 
 #include "common.h"
 #include <errno.h>
 
 #include "common.h"
@@ -760,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;
                                        }
                                }