Date: Tue, 8 Apr 2008 19:43:47 +0200 (CEST) From: Roland Smith <rsmith@xs4all.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/122581: [PATCH] hungarian/hunspell dumps core on amd64 when checking a LaTeX file. Message-ID: <20080408174347.F02C1B903@slackbox.xs4all.nl> Resent-Message-ID: <200804081750.m38Ho2DV023921@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122581 >Category: ports >Synopsis: [PATCH] hungarian/hunspell dumps core on amd64 when checking a LaTeX file. >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 08 17:50:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Roland Smith >Release: FreeBSD 7.0-STABLE amd64 >Organization: >Environment: System: FreeBSD slackbox.xs4all.nl 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Feb 29 01:45:32 CET 2008 rsmith@slackbox.xs4all.nl:/usr/obj/usr/src/sys/RFS amd64 >Description: Hunspell dumps core on amd64 when correcting a LaTeX file. >How-To-Repeat: Check a LaTeX file with hunspell on amd64 using the '-t' option. >Fix: Hunspell crashes because the calculation of PATTERN_LEN in sr/parsers/latexparser.cxx does not account for padding. I've supplied the fix to hunspell's sourceforge bugtracker. But in case it gets lost, here is the patch. ----- patch-src_parsers_latexparser.cxx ----- --- src/parsers/latexparser.cxx.orig 2008-04-08 18:46:35.000000000 +0200 +++ src/parsers/latexparser.cxx 2008-04-08 18:46:48.000000000 +0200 @@ -82,7 +82,7 @@ { { "\\url", NULL } , 1 } }; -#define PATTERN_LEN (sizeof(PATTERN) / ((sizeof(char *) * 2) + sizeof(int))) +#define PATTERN_LEN (sizeof(PATTERN) / sizeof(PATTERN[0])) LaTeXParser::LaTeXParser(const char * wordchars) { ----- patch-src_parsers_latexparser.cxx ----- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080408174347.F02C1B903>