diff -uNrBb htmldoc-1.9.x-r1629/htmldoc/file.cxx htmldoc-1.9.x-r1629-new/htmldoc/file.cxx
--- htmldoc-1.9.x-r1629/htmldoc/file.cxx 2009-01-06 07:01:36 +0300
+++ htmldoc-1.9.x-r1629-new/htmldoc/file.cxx 2009-12-03 16:33:14 +0300
@@ -108,7 +108,7 @@
if (!s || !t)
return (NULL);
- if ((baseptr = strrchr(s, '/')) != NULL)
+ if ((baseptr = strrchr((char*) s, '/')) != NULL)
baseptr ++;
#ifdef WIN32
else if ((baseptr = strrchr(s, '\\')) != NULL)
diff -uNrBb htmldoc-1.9.x-r1629/htmldoc/ps-pdf.cxx htmldoc-1.9.x-r1629-new/htmldoc/ps-pdf.cxx
--- htmldoc-1.9.x-r1629/htmldoc/ps-pdf.cxx 2009-06-03 07:49:09 +0400
+++ htmldoc-1.9.x-r1629-new/htmldoc/ps-pdf.cxx 2009-12-04 12:29:02 +0300
@@ -663,6 +663,7 @@
for (page = 0; page < num_pages; page ++)
// Safe because page_text is more than 6 chars
strcpy((char *)pages[page].page_text, (page & 1) ? "eltit" : "title");
+// memcpy((char *)pages[page].page_text, (page & 1) ? "eltit" : "title", 6);
}
else
page = 0;
@@ -6368,7 +6369,7 @@
{
columns[col].width += regular_width;
DEBUG_printf((" columns[%d].width=%.1f\n", col,
- columns[col].widt));
+ columns[col].width));
}
}
}
@@ -6756,7 +6757,7 @@
DEBUG_printf(("col=%d, start_y=%.1f, start_page=%d, end_page=%d, "
"rowspan=%d, span_height=%.1f, height=%.1f\n",
col, columns[col].start_y, columns[col].start_page,
- columns[col].end_page, columns[col].rowspans[col],
+ columns[col].end_page, columns[col].rowspan,
columns[col].span_height, columns[col].height));
if (columns[col].rowspan == rowspan &&
@@ -8920,7 +8920,7 @@
if ((type != HD_RENDER_TEXT && type != HD_RENDER_LINK) || data == NULL)
r = (hdRender *)calloc(sizeof(hdRender), 1);
else
- r = (hdRender *)calloc(sizeof(hdRender) + strlen((char *)data), 1);
+ r = (hdRender *)calloc(sizeof(hdRender) + strlen((char *)data) + 1, 1);
if (r == NULL)
{
@@ -8945,7 +8945,8 @@
return (NULL);
}
// Safe because buffer is allocated...
- strcpy((char *)r->data.text.buffer, (char *)data);
+// strcpy((char *)r->data.text.buffer, (char *)data);
+ memcpy((char *)r->data.text.buffer, data, strlen((char *)data)+1);
r->data.text.rgb[0] = _htmlStyleSheet->def_style.color[0] / 255.0;
r->data.text.rgb[1] = _htmlStyleSheet->def_style.color[1] / 255.0;
r->data.text.rgb[2] = _htmlStyleSheet->def_style.color[2] / 255.0;
@@ -8968,7 +8969,8 @@
return (NULL);
}
// Safe because buffer is allocated...
- strcpy((char *)r->data.link, (char *)data);
+// strcpy((char *)r->data.link, (char *)data);
+ memcpy((char *)r->data.link, data, strlen((char *)data)+1);
break;
}
@@ -11223,10 +11225,10 @@
#ifdef DEBUG
puts("The following fonts were used:");
- for (i = 0; i < TYPE_MAX; i ++)
- for (j = 0; j < STYLE_MAX; j ++)
- if (fonts_used[i][j])
- printf(" %s\n", _htmlFonts[i][j]);
+// for (i = 0; i < TYPE_MAX; i ++)
+// for (j = 0; j < STYLE_MAX; j ++)
+// if (fonts_used[i][j])
+// printf(" %s\n", fonts_used[i][j]);
#endif // DEBUG
/*
diff -uNrBb htmldoc-1.9.x-r1629/htmldoc/stylesheet.cxx htmldoc-1.9.x-r1629-new/htmldoc/stylesheet.cxx
--- htmldoc-1.9.x-r1629/htmldoc/stylesheet.cxx 2009-03-30 09:52:44 +0400
+++ htmldoc-1.9.x-r1629-new/htmldoc/stylesheet.cxx 2009-12-04 13:52:53 +0300
@@ -766,7 +765,13 @@
const char * // O - Element name
hdStyleSheet::get_element(hdElement e) // I - Element enumeration
{
- return (hd_elements[e]);
+char *ret;
+ if ( (e>0) && (e