summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d3b4740)
raw | patch | inline | side by side (parent: d3b4740)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 19 May 2006 04:19:52 +0000 (04:19 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 19 May 2006 04:19:52 +0000 (04:19 +0000) |
src/extension/internal/pdf-mini.h | patch | blob | history |
index ca577443e0acad79510fdcac8c688a2d62730ee5..d12196a6dc7407d171d26bb765faa9191aca1ab3 100644 (file)
os << "xref\n";\r
os << "0" << " " << size << "\n";\r
\r
- sprintf(buffer, "%010d %05d %c \n", 0, 65535, 'f');\r
+ snprintf(buffer, sizeof(buffer), "%010d %05d %c \n", 0, 65535, 'f');\r
+ buffer[sizeof(buffer)-1] = 0;\r
os << buffer;\r
\r
for (i = 1; i < size; i++) {\r
- sprintf(buffer, "%010d %05d %c \n", table->get_entry(i), 0, 'n');\r
+ snprintf(buffer, sizeof(buffer), "%010d %05d %c \n", (int)table->get_entry(i), 0, 'n');\r
+ buffer[sizeof(buffer)-1] = 0;\r
os << buffer;\r
}\r
\r