Bug 11880 - Typo in tape.c potential hazard...
Typo in tape.c potential hazard...
Product: Red Hat Linux
Classification: Retired
Component: dump (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
: Security
Depends On:
  Show dependency treegraph
Reported: 2000-06-02 23:35 EDT by SB
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-03 18:30:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description SB 2000-06-02 23:35:39 EDT
Here's the descrepency I noticed:

line 77: # define BUFSIZ _IO_BUFSIZ

line 43: #define _IO_BUFSIZ _G_BUFSIZ

line 85: #define _G_BUFSIZ 8192

line 53: #define TP_BSIZE        1024

line 74: extern FILE        *terminal;

line 311:         char buf[TP_BSIZE];
line 357:                         (void) fgets(buf, BUFSIZ, terminal);

Now isn't putting potentially 8192 bytes of data in a 1024 byte
variable a bit much?  Anyway, either change line 311 in tape.c to:
        char buf[BUFSIZ];
or change line 357 of tape.c to:
                        (void) fgets(buf, TP_BSIZE, terminal);
I expect either one should do the job.

-Stan Bubrouski
Comment 1 Stelian Pop 2000-06-03 18:30:09 EDT
You are absolutely right. Thanks for the bug report.

Could you in the future send a copy of this kind of bug reports directly
to the dump maintainer. It would be easier for me to get the patches...
I know, it's the job of RedHat's guys but...

Comment 2 Preston Brown 2000-06-27 12:09:07 EDT
fixed in rawhide.

Note You need to log in before you can comment on or make changes to this bug.