Bug 19302
Summary: | read("/proc/net/tcp") fails with buffer <= 128 bytes. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Sam Varshavchik <mrsam> | ||||
Component: | kernel | Assignee: | Arjan van de Ven <arjanv> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.0 | CC: | arjan | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-12-16 04:08:44 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Sam Varshavchik
2000-10-18 03:13:54 UTC
Created attachment 4309 [details]
An example
This is an off-by-one error; the patch below fixes it for me. --- linux/net/ipv4/proc.c.org Wed Oct 18 18:27:26 2000 +++ linux/net/ipv4/proc.c Wed Oct 18 19:27:58 2000 @@ -186,7 +186,7 @@ if (req->sk) continue; pos += 128; - if (pos < offset) + if (pos <= offset) continue; get__openreq(sp, req, tmpbuf, i); len += sprintf(buffer+len, "%-127s\n", tmpbuf); @@ -196,7 +196,7 @@ } pos += 128; - if (pos < offset) + if (pos <= offset) goto next; get__sock(sp, tmpbuf, i, format); Long fixed should have been closed |