Page MenuHomeFreeBSD

D7368.diff
No OneTemporary

D7368.diff

Index: usr.bin/sed/main.c
===================================================================
--- usr.bin/sed/main.c
+++ usr.bin/sed/main.c
@@ -124,6 +124,7 @@
int
main(int argc, char *argv[])
{
+ char *temp_arg;
int c, fflag;
(void) setlocale(LC_ALL, "");
@@ -146,7 +147,10 @@
break;
case 'e':
eflag = 1;
- add_compunit(CU_STRING, optarg);
+ asprintf(&temp_arg, "%s\n", optarg);
+ if (temp_arg == NULL)
+ errx(1, "Couldn't allocate temporary buffer");
+ add_compunit(CU_STRING, temp_arg);
break;
case 'f':
fflag = 1;

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 26, 7:15 PM (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26223277
Default Alt Text
D7368.diff (560 B)

Event Timeline