Project

General

Profile

Bug #703

hashmake calls gets() but should use fgets().

Added by Garrett D'Amore about 10 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
cmd - userland programs
Start date:
2011-02-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

This can result in an array overrun.

53     hashinit();
54 while (gets(word)) {
55 (void) printf("%.*lo\n", (HASHWIDTH+2)/3, hash(word));
56 }

This is a simple enough thing to fix.

Also available in: Atom PDF