Page MenuHomeFreeBSD

D7368.1796064923.diff
No OneTemporary

Authored By
Unknown
Size
560 B
Referenced Files
None
Subscribers
None

D7368.1796064923.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
Mon, Nov 30, 6:55 PM (14 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42110597
Default Alt Text
D7368.1796064923.diff (560 B)

Event Timeline