Opened 3 years ago

Closed 3 years ago

#13925 closed bug (fixed)

libroot: Fix possible typo in printf_size.c

Reported by: ohnx56 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/ Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


It appears as if there is a typo in printf_size.c; it makes no sense to compare an unitialized variable in such a way. Since info->width is referenced later on in the variable assignment, it seems possible that the intended statement was to place the larger of the values between info->width and info->prec into width.

Fixes CID 609431.

Attachments (1)

0001-libroot-Fix-possible-typo-in-printf_size.c.patch (1.3 KB ) - added by ohnx56 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by ohnx56, 3 years ago

patch: 01

comment:2 by korli, 3 years ago

Indeed the original patch is here:

Is it OK if I apply this instead of your patch?

comment:3 by ohnx56, 3 years ago

Ah! Didn't know about that :p

Of course.

comment:4 by ohnx56, 3 years ago

Actually, it seems the Haiku version is different from the glibc patch's version; someone must have already fixed the second width.

Not sure if that affects the patch though.

comment:5 by korli, 3 years ago

Resolution: fixed
Status: newclosed

Applied in hrev51726, thanks!

Note: See TracTickets for help on using tickets.