List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:April 8 2011 8:27pm
Subject:bzr commit into mysql-5.1 branch (nirbhay.choubey:3650) Bug#12329909
View as plain text  
#At file:///home/nirbhay/Project/mysql/repo/bugs/mysql-5.1.12329909/ based on revid:nirbhay.choubey@stripped

 3650 Nirbhay Choubey	2011-04-09
      BUG#12329909 - BUILDING MYSQL WITH DEBUG SUPPORT
                     FAILS WITH LIBEDIT
      
      Fixed by checking the return value of the write()
      function calls.
     @ cmd-line-utils/libedit/vi.c
        BUG#12329909 - BUILDING MYSQL WITH DEBUG SUPPORT
                       FAILS WITH LIBEDIT
        
        Added a check on the return value of the write()
        function calls.

    modified:
      cmd-line-utils/libedit/vi.c
=== modified file 'cmd-line-utils/libedit/vi.c'
--- a/cmd-line-utils/libedit/vi.c	2010-10-19 22:36:59 +0000
+++ b/cmd-line-utils/libedit/vi.c	2011-04-08 20:27:16 +0000
@@ -1012,8 +1012,10 @@ vi_histedit(EditLine *el, int c __attrib
 	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)
+          return CC_ERROR;
+	if (write(fd, "\n", 1) == -1)
+          return CC_ERROR;
 	pid = fork();
 	switch (pid) {
 	case -1:


Attachment: [text/bzr-bundle] bzr/nirbhay.choubey@oracle.com-20110408202716-mqlwh8hfevdrq5io.bundle
Thread
bzr commit into mysql-5.1 branch (nirbhay.choubey:3650) Bug#12329909Nirbhay Choubey8 Apr
  • Re: bzr commit into mysql-5.1 branch (nirbhay.choubey:3650) Bug#12329909Davi Arnaut11 Apr