Bug 520203

Summary: NULL pointer passed to vsnprintf
Product: [Fedora] Fedora Reporter: Lauri Nurmi <lanurmi>
Component: fingerAssignee: Radek Vokál <rvokal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 11CC: rvokal
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-07 14:12:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix none

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