Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146179392
D10102.id27113.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
463 B
Referenced Files
None
Subscribers
None
D10102.id27113.diff
View Options
Index: head/usr.bin/grep/grep.c
===================================================================
--- head/usr.bin/grep/grep.c
+++ head/usr.bin/grep/grep.c
@@ -314,8 +314,12 @@
}
len = 0;
line = NULL;
- while ((rlen = getline(&line, &len, f)) != -1)
+ while ((rlen = getline(&line, &len, f)) != -1) {
+ if (line[0] == '\0')
+ continue;
add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen);
+ }
+
free(line);
if (ferror(f))
err(2, "%s", fn);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 1, 12:26 PM (3 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29113280
Default Alt Text
D10102.id27113.diff (463 B)
Attached To
Mode
D10102: bsdgrep(1): Handle special case of pattern being terminated early with a NULL byte
Attached
Detach File
Event Timeline
Log In to Comment