Opened 7 years ago

Closed 7 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/libroot.so Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

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 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by ohnx56, 7 years ago

patch: 01

comment:2 by korli, 7 years ago

Indeed the original patch is here: https://github.com/bminor/glibc/commit/fa5753eede3e97e94f50928989b313fb1fbdae6f.patch

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

comment:3 by ohnx56, 7 years ago

Ah! Didn't know about that :p

Of course.

comment:4 by ohnx56, 7 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, 7 years ago

Resolution: fixed
Status: newclosed

Applied in hrev51726, thanks!

Note: See TracTickets for help on using tickets.