🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by root Wed, 10 Oct 1984 04:47
bug in 'buildmap' - (nf)
#190
Author: root
Date: Wed, 10 Oct 1984 04:47
20 lines
1060 bytes
#N:inmet:7400003:000:615
inmet!root    Oct  9 00:03:00 1984

Users of Jeff Donnely's "buildmap" program -- you're in for some
trouble with the latest usenet map -- it contains a one-letter
name which causes the hash function in lookup() to screw up:


    len = strlen (sys_name);
    hash = (sys_name[0] - '0');
    hash = hash * 75 + (sys_name[1] - '0');
    hash = hash * 75 + (sys_name[len-1] -'0');
	/* Notice that this one reaches into nowhere if len < 2  -- nrh */
    hash = hash * 75 + (sys_name[len-2] - '0');
    
The fix is to test to be sure that len > 1 before using a value
like sys_name[len -2].  Sometimes, ada'd be better....

					Nat Howard
					inmet!nrh
Re: bug in 'buildmap'
#191
Author: donnelly
Date: Fri, 12 Oct 1984 17:11
3 lines
688 bytes
Sorry for the bug.

Who'd have thought of one letter site names?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads