OpenBSD CVS

CVS log for src/usr.bin/grep/util.c


[BACK] Up to [local] / src / usr.bin / grep

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_5_0


Revision 1.42 / (download) - annotate - [select for diffs], Sun Jul 17 19:39:21 2011 UTC (12 years, 10 months ago) by aschrijver
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.41: +9 -3 lines
Diff to previous 1.41 (colored)

Fix an integer overflow for very long lines by replacing the datatype of 2 offsets from int to regoff_t.

Bail if the given size_t line length doesn't fit into the new regoff_t.

"I don't think you will ever be able to get a string longer than
SSIZE_MAX into memory, but that looks good." tedu@

"Agreed" otto@

regoff_t suggested by otto@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.