SHA256
1
0
forked from pool/dictd
dictd/index-buf-ovrflw.patch
Matěj Cepl e0a55a2436
Update to 1.13.2
- Included changes:
   - Remove config.{sub,guess}
   - Update version to 1.13.2
   - Rename configure.in to configure.ac
   - dictP.h: remove #include <sys/time.h>
   - configure.in: fix obsolete code
   - Fix compilation issues with gcc-14
   - Update configure script and the like (autoconf-2.72)
- Remove upstreamed patch gcc-14.patch
- Add index-buf-ovrflw.patch to overcome a buffer overflow
  (courtesy of the upstream author)
2024-11-16 13:06:59 +01:00

23 lines
668 B
Diff

diff --git a/index.c b/index.c
index ced1459..883a12d 100644
--- a/index.c
+++ b/index.c
@@ -1505,7 +1505,7 @@ static int dict_search_suffix(
assert (database);
if (database->index_suffix){
- buf = (char *) alloca (strlen (word));
+ buf = (char *) alloca (strlen (word) + 1);
strcpy (buf, word);
PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf));
@@ -1549,7 +1549,7 @@ static int dict_search_last (
assert (database);
if (database->index_suffix){
- buf = (char *) alloca (strlen (word));
+ buf = (char *) alloca (strlen (word) + 1);
strcpy (buf, word);
PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf));