Group :: Sistema/Bibliotecas
RPM: libedit
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: libedit-alt-fix-warnings.patch
Download
Download
--- libedit-20061228-2.10/src/vi.c.fix 2007-01-13 21:35:29 +0300
+++ libedit-20061228-2.10/src/vi.c 2007-01-13 21:35:07 +0300
@@ -1011,10 +1011,10 @@ vi_histedit(EditLine *el, int c)
fd = mkstemp(tempfile);
if (fd < 0)
return CC_ERROR;
cp = el->el_line.buffer;
- write(fd, cp, el->el_line.lastchar - cp +0u);
- write(fd, "\n", 1);
+ if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1 || write(fd, "\n", 1) == -1)
+ return CC_ERROR;
pid = fork();
switch (pid) {
case -1:
close(fd);