On Tue, Jun 25, 2013 at 02:18:53PM -0700, Alan Coopersmith wrote:
> On 06/25/13 02:13 PM, Mark Kettenis wrote:
> >>From: Thomas Klausner <[email protected]>
> >>Date: Tue, 25 Jun 2013 23:02:45 +0200
> >>
> >>len is unsigned and can't be smaller than zero.
> >
> >But vsnprintf(3) returns a signed integer, which can be -1.
>
> Right, so I guess we either make len be signed, or change the if statement
> to "if (len == (Cardinal) -1)".
Ok, here's an alternate patch.
Thomas
diff --git a/src/Alloc.c b/src/Alloc.c
index c523d81..c9ffce8 100644
--- a/src/Alloc.c
+++ b/src/Alloc.c
@@ -133,7 +133,7 @@ Cardinal XtAsprintf(
...)
{
char buf[256];
- Cardinal len;
+ int len;
va_list ap;
va_start(ap, format);
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel