All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 23282] New: vsnprintf(3) example promotes code which ignores error return code
@ 2010-11-19  2:58 bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
  0 siblings, 1 reply; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2010-11-19  2:58 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282

           Summary: vsnprintf(3) example promotes code which ignores error
                    return code
           Product: Documentation
           Version: unspecified
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: man-pages
        AssignedTo: documentation_man-pages-ztI5WcYan/vQLgFONoPN62D2FQJk+8+b@public.gmane.org
        ReportedBy: graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
        Regression: No


The example given in the vsnprintf(3) man page (release 3.31) attempts to be
backwards compatible with glibc < 2.0.6 by assuming that a negative return code
from vsnprintf indicates truncation.

If a negative return code is indicated for other reasons, the example will loop
until the process' virtual memory is exhausted.

Please see the following for an example of how a malicious user could
deliberately trigger this (potentially causing a denial of service).
http://my.opera.com/taviso/blog/2007/05/28/auditing-puzzle

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
@ 2013-02-08  9:28   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-09  0:16   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-08  9:28 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #1 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-08 09:28:03 ---
Created an attachment (id=92661)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=92661)
handle the error code

The above patch tries to be completely in align with the coding style.This
change in example will prevent the crashing of code.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
  2013-02-08  9:28   ` [Bug 23282] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-09  0:16   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-09  2:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-09  0:16 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #2 from Graham Gower <graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-09 00:16:38 ---
Marshel, that patch does not address the ambiguity created by backwards
compatibility with glibc 2.0.6, it merely removes the backwards compatilibility
(while retaining notes that it is compatible). You also omit the return value
in your return statement.

I'd be happy with the backwards compatibility removed (and a note to that
effect), given glibc 2.0 is now 15 years old. The code could then be
simplified. At the time I encountered this issue, I wrote the following code,
which would just error out in the case of truncation with old glibc.
http://code.google.com/p/opkg/source/browse/trunk/libopkg/sprintf_alloc.c

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
  2013-02-08  9:28   ` [Bug 23282] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-09  0:16   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-09  2:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-11 15:09   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-09  2:08 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282


Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org




--- Comment #3 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-09 02:08:38 ---
 (In reply to comment #2)

> I'd be happy with the backwards compatibility removed (and a note to that
> effect), given glibc 2.0 is now 15 years old. The code could then be
> simplified. 

Agreed. I'd accept a patch along those lines. Does someone want to write one?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (2 preceding siblings ...)
  2013-02-09  2:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-11 15:09   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-11 15:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-11 15:09 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #4 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-11 15:09:28 ---
Created an attachment (id=93121)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=93121)
handle error code 

Okay this time I have tried to address the backward compatibility issue.I have
made the change in NOTES section of the Documentation.I have gone through the
entire Documentation and could find only two places where it is mentioned.

Regarding the return value I couldn't figure out what to return :-) apart from
NULL.

I have kept the code simple and also test it.Though the codes have been changed
comments are not felt like they fit perfectly.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (3 preceding siblings ...)
  2013-02-11 15:09   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-11 15:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-11 21:38   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-11 15:11 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #5 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-11 15:11:10 ---
Guys, Thanks a ton for your reply.I have added another patch. Waiting for your
response.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (4 preceding siblings ...)
  2013-02-11 15:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-11 21:38   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-12  7:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-11 21:38 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #6 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-11 21:38:50 ---
Graham,

Could you review?

Thanks,

Michael

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (5 preceding siblings ...)
  2013-02-11 21:38   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-12  7:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-19  7:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-12  7:11 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #7 from Graham Gower <graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-12 07:11:35 ---
I'm not able to properly look at it this week... Due to connectivity problems
I'm stuck to typing this on my phone.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (6 preceding siblings ...)
  2013-02-12  7:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-19  7:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-22 11:28   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-19  7:08 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #8 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-19 07:08:07 ---
Just to remind you that the patch have not been reviewed. Are you back to Good
Internet...?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (7 preceding siblings ...)
  2013-02-19  7:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-22 11:28   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-22 17:23   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-22 11:28 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #9 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-22 11:28:29 ---
Can Somebody review the patch...?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (8 preceding siblings ...)
  2013-02-22 11:28   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-22 17:23   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-22 23:01   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-22 17:23 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #10 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-22 17:23:36 ---
(In reply to comment #6)
> Graham,
> 
> Could you review?
> 
> Thanks,
> 
> Michael


Michael,

Can I expect some response...?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (9 preceding siblings ...)
  2013-02-22 17:23   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-22 23:01   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-25  6:44   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-22 23:01 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #11 from Graham Gower <graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-22 23:01:24 ---
Marshal, I don't apreciate being constantly badgered to review your patch.
*One* email, or *one* comment here would have sufficed.


>--- a/man3/printf.3
>+++ b/man3/printf.3
>@@ -892,7 +892,9 @@ and
> conforms to the C99 standard, that is, behaves as described above,
> since glibc version 2.1.
> Until glibc 2.0.6 they would return \-1
>-when the output was truncated.
>+when the output was truncated.In current implementation a negative value 
>+is returned if an output error is encountered(see Return Value).Hence
>+these functions are not compatible with glibc 2.0.6 and before.

I'm unfamiliar with man page formatting conventions, but a cursory look at the
rest of this file indicates that new sentences should be on new lines. In any
event, I don't think this text adds anything useful.

> .\" .SH HISTORY
> .\" UNIX V7 defines the three routines
> .\" .BR printf (),
>@@ -1024,7 +1026,7 @@ With the value:
> one might obtain "Sonntag, 3. Juli, 10:02".
> .PP
> To allocate a sufficiently large string and print into it
>-(code correct for both glibc 2.0 and glibc 2.1):
>+(code incompatible for glibc 2.0.6 and before):

How about
"If truncation occurs in glibc versions prior to 2.0.6, this is treated as an
error instead of being handled gracefully"

> .nf
> 
> #include <stdio.h>
>@@ -1050,18 +1052,21 @@ make_message(const char *fmt, ...)
>         n = vsnprintf(p, size, fmt, ap);
>         va_end(ap);
> 
>+	/* Check error code */
>+	
>+	if (n < 0)
>+	    return NULL ;
>+	     

The indentation here is not consistent with the rest of the example.

>         /* If that worked, return the string. */
> 
>-        if (n > \-1 && n < size)
>+        if (n < size)
>             return p;
> 
>         /* Else try again with more space. */
> 
>-        if (n > \-1)    /* glibc 2.1 */
>+        else
>             size = n+1; /* precisely what is needed */
>-        else           /* glibc 2.0 */
>-            size *= 2;  /* twice the old size */
>-
>+        
>         if ((np = realloc (p, size)) == NULL) {
>             free(p);
>             return NULL;
>-- 
>1.7.0.4

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (10 preceding siblings ...)
  2013-02-22 23:01   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-25  6:44   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-25 16:42   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
                     ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-25  6:44 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #12 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-25 06:44:02 ---
@Graham: Thanks for the review Graham.

@Marshel: Thanks for the revised patch. I appreciate that you're keen to get
your patch reviewed, but everyone's on private time here, so things can be
slow. As such, it's best to space your pings out a bit. I'm inclined to agree
with Graham's comment that the first piece of text that you added probably
isn't needed. But, otherwise, if you can fix the rest of the patch up as per
Graham's comments, I'm happy to apply it.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (11 preceding siblings ...)
  2013-02-25  6:44   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-25 16:42   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-25 22:04   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-28 13:20   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-25 16:42 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #13 from Marshel Abraham <Marshel.Abraham-Mykyq1cwIDpWk0Htik3J/w@public.gmane.org>  2013-02-25 16:42:46 ---
Created an attachment (id=94071)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=94071)
handle error code: patch no.3

*One Comment* :-)

Sorry for the trouble and Thanks for your patience. I think indentation is
right this time.

Please review and let me know about further changes needed.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (12 preceding siblings ...)
  2013-02-25 16:42   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-25 22:04   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  2013-02-28 13:20   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-25 22:04 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282





--- Comment #14 from Graham Gower <graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-25 22:04:31 ---
acked-by: graham.gower-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug 23282] vsnprintf(3) example promotes code which ignores error return code
       [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
                     ` (13 preceding siblings ...)
  2013-02-25 22:04   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2013-02-28 13:20   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
  14 siblings, 0 replies; 16+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2013-02-28 13:20 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

https://bugzilla.kernel.org/show_bug.cgi?id=23282


Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |CODE_FIX




--- Comment #15 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  2013-02-28 13:20:21 ---
Applied.

Marshel, thanks for the fix to Graham's bug!

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-02-28 13:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19  2:58 [Bug 23282] New: vsnprintf(3) example promotes code which ignores error return code bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
     [not found] ` <bug-23282-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2013-02-08  9:28   ` [Bug 23282] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-09  0:16   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-09  2:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-11 15:09   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-11 15:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-11 21:38   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-12  7:11   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-19  7:08   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-22 11:28   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-22 17:23   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-22 23:01   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-25  6:44   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-25 16:42   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-25 22:04   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2013-02-28 13:20   ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.