From 636978169d526e032bb4ec0da7e138378340bc89 Mon Sep 17 00:00:00 2001 From: avsm Date: Mon, 14 Apr 2003 09:47:46 +0000 Subject: [PATCH] fix bad static buffer bound - submitted to upsteam author ok kevlo@ --- audio/libcdaudio/patches/patch-source_cdindex_c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 audio/libcdaudio/patches/patch-source_cdindex_c diff --git a/audio/libcdaudio/patches/patch-source_cdindex_c b/audio/libcdaudio/patches/patch-source_cdindex_c new file mode 100644 index 00000000000..c2b3229ed6a --- /dev/null +++ b/audio/libcdaudio/patches/patch-source_cdindex_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-source_cdindex_c,v 1.1 2003/04/14 09:47:46 avsm Exp $ +--- source/cdindex.c.orig Mon Apr 14 10:06:46 2003 ++++ source/cdindex.c Mon Apr 14 10:07:43 2003 +@@ -878,7 +878,7 @@ cdindex_http_submit(int cd_desc, struct + strncpy(outbuffer, "Content-Type: text/plain\n", 512); + write(sock, outbuffer, strlen(outbuffer)); + +- snprintf(cdindex_file, 512, "%s/.cdindex/%s", ++ snprintf(cdindex_file, sizeof cdindex_file, "%s/.cdindex/%s", + getenv("HOME"), entry.entry_cdindex_id); + stat(cdindex_file, &st); +