diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-05 23:27:58 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-05 23:27:58 (GMT) |
commit | 101de912d3613132b2eb80c802551006b3a11624 (patch) | |
tree | ecbe457e13e8567ff336644a658bc5cff73e5bcc /Mac/Modules/hfsplusmodule.c | |
parent | 8a97f4a380a7a356730e48406f8269c3efe5e6eb (diff) | |
download | cpython-101de912d3613132b2eb80c802551006b3a11624.zip cpython-101de912d3613132b2eb80c802551006b3a11624.tar.gz cpython-101de912d3613132b2eb80c802551006b3a11624.tar.bz2 |
Replace sprintf() with PyOS_snprintf().
Diffstat (limited to 'Mac/Modules/hfsplusmodule.c')
-rw-r--r-- | Mac/Modules/hfsplusmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Mac/Modules/hfsplusmodule.c b/Mac/Modules/hfsplusmodule.c index 56c9cca..425bdb8 100644 --- a/Mac/Modules/hfsplusmodule.c +++ b/Mac/Modules/hfsplusmodule.c @@ -1251,9 +1251,9 @@ PyObject *macos_error_for_call(OSErr err, const char *name, const char *item) char buffer[1024]; if (item) - sprintf(buffer, "mac error calling %s on %s", name, item); + PyOS_snprintf(buffer, sizeof(buffer), "mac error calling %s on %s", name, item); else - sprintf(buffer, "mac error calling %s", name); + PyOS_snprintf(buffer, sizeof(buffer), "mac error calling %s", name); v = Py_BuildValue("(is)", err, buffer); if (v != NULL) { @@ -1376,9 +1376,9 @@ void printableUniStr(const HFSUniStr255 *uni, char *buffer) UniChar uch = uni->unicode[i]; if ((uch & 0x7f) == uch) { - sprintf(localbuf, "%c", uch); + PyOS_snprintf(localbuf, sizeof(localbuf), "%c", uch); } else { - sprintf(localbuf, "\\u%04x", uch); + PyOS_snprintf(localbuf, sizeof(localbuf), "\\u%04x", uch); } strcat(buffer, localbuf); } |