Page MenuHomeFreeBSD

D61995.1795628964.diff
No OneTemporary

Authored By
Unknown
Size
705 B
Referenced Files
None
Subscribers
None

D61995.1795628964.diff

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

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)

Event Timeline