Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177949772
D61995.1795628964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
705 B
Referenced Files
None
Subscribers
None
D61995.1795628964.diff
View Options
diff --git a/stand/ficl/loader.c b/stand/ficl/loader.c
--- a/stand/ficl/loader.c
+++ b/stand/ficl/loader.c
@@ -428,12 +428,23 @@
/* feed each line to ficlExec */
while (1) {
- int status, i;
+ int status, i, line_too_long;
i = 0;
- while ((status = read(fd, &ch, 1)) > 0 && ch != '\n')
- cp[i++] = ch;
+ line_too_long = 0;
+ while ((status = read(fd, &ch, 1)) > 0 && ch != '\n') {
+ if (i < nLINEBUF)
+ cp[i++] = ch;
+ else
+ line_too_long = 1;
+ }
nLine++;
+ if (line_too_long) {
+ printf("ficl: input line %d too long (max %d bytes)\n",
+ nLine, nLINEBUF);
+ pVM->sourceID = id;
+ return (VM_ERREXIT);
+ }
if (!i) {
if (status < 1)
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 25, 5:49 PM (20 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41995579
Default Alt Text
D61995.1795628964.diff (705 B)
Attached To
Mode
D61995: ficl: bound line length in file input
Attached
Detach File
Event Timeline