[9455] in Athena Bugs
rt 7.4E: /source/athena/athena.bin/ispell/buildhash.c
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Jun 11 19:53:42 1992
Date: Thu, 11 Jun 92 19:53:28 -0400
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: bugs@Athena.MIT.EDU
System name: pit-manager
Type and version: RTPC-ROMPC 7.4E
Display type: apa16
megapel
What were you trying to do?
Hash a new ispell dictionary.
What's wrong:
Buildhash.c dereferences a null pointer in strlen if a
hashtable element is not used.
What should have happened:
It shouldn't do this. Coredumping is bad.
Please describe any relevant documentation references:
This patch:
*** 1.1 1987/05/12 15:47:05
--- buildhash.c 1992/06/11 23:50:31
***************
*** 121,126 ****
--- 121,128 ----
(void) fwrite (&hashheader, sizeof hashheader, 1, outfile);
strptr = 0;
for (i = 0; i < hashsize; i++) {
+ if (! hashtbl[i].used)
+ continue;
n = strlen (hashtbl[i].word) + 1;
(void) fwrite (hashtbl[i].word, n, 1, outfile);
hashtbl[i].word = (char *)strptr;
jik