Bug 520203 - NULL pointer passed to vsnprintf
Summary: NULL pointer passed to vsnprintf
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: finger
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Radek Vokál
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-28 22:00 UTC by Lauri Nurmi
Modified: 2009-09-07 14:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-07 14:12:32 UTC


Attachments (Terms of Use)
Fix (314 bytes, patch)
2009-08-28 22:01 UTC, Lauri Nurmi
no flags Details | Diff

Description Lauri Nurmi 2009-08-28 22:00:29 UTC
Description of problem:
Finger a user whose real name is not set, and finger will tell you "Name: (null)". This is because a NULL pointer was passed to xprintf (and further to vsnprintf) at lprint.c:102.

My impression is that passing NULL pointers to *printf functions has undefined behavior although it doesn't cause much trouble with glibc.

Patch provided that initializes the realname to point to an empty string.

Version-Release number of selected component (if applicable):
finger-0.17-37.fc11.x86_64

How reproducible:
Always

Comment 1 Lauri Nurmi 2009-08-28 22:01:22 UTC
Created attachment 359126 [details]
Fix

Comment 2 Radek Vokál 2009-09-07 14:12:32 UTC
Thanks for the patch, fixed in 0.17-39


Note You need to log in before you can comment on or make changes to this bug.