openbsd-ports/misc/wordnet/patches/patch-src_wn_c
sthen b35f6050f8 - SECURITY update, add patches to fix oCERT-2008-014,
WordNet stack and heap overflows. Thanks to Rob Holland
of oCERT for contacting us with the advisory.

- housekeeping: regenerate PLIST, move to Tcl/Tk 8.5,
use SUBST_CMD macro rather than hand-rolled command.
2008-09-01 20:02:53 +00:00

30 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$OpenBSD: patch-src_wn_c,v 1.1 2008/09/01 20:02:53 sthen Exp $
--- src/wn.c.orig Thu Nov 30 21:40:26 2006
+++ src/wn.c Mon Sep 1 20:53:39 2008
@@ -129,7 +129,7 @@ static void printusage(), printlicense(),
printsearches(char *, int, unsigned long);
static int error_message(char *);
-main(int argc,char *argv[])
+int main(int argc,char *argv[])
{
display_message = error_message;
@@ -225,14 +225,14 @@ static int do_search(char *searchword, int pos, int se
printf("\n%s of %s %s\n%s",
label, partnames[pos], searchword, outbuf);
- if (morphword = morphstr(searchword, pos))
+ if ((morphword = morphstr(searchword, pos)) != NULL)
do {
outbuf = findtheinfo(morphword, pos, search, whichsense);
totsenses += wnresults.printcnt;
if (strlen(outbuf) > 0)
printf("\n%s of %s %s\n%s",
label, partnames[pos], morphword, outbuf);
- } while (morphword = morphstr(NULL, pos));
+ } while ((morphword = morphstr(NULL, pos)) != NULL);
return(totsenses);
}