Bug 73425

Summary: g_string_printf loses data on embeded '\0' in certain cases
Product: [Retired] Red Hat Linux Reporter: James Antill <james.antill>
Component: glib2Assignee: Owen Taylor <otaylor>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-01 01:34:12 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
Source of program to show bug.
none
Proposed patch. none

Description James Antill 2002-09-04 15:53:29 UTC
Description of Problem:

 If you call g_mem_set_vtable() then on a system with vasprintf() you will lose
data if you call g_string_printf() with a '\0' byte in the data.

Version-Release number of selected component (if applicable):
glib2-2.0.1-2

How Reproducible:
 Always.

Steps to Reproduce:
1. See attached program.
2. 
3. 

Actual Results:
 attached source dies.

Expected Results:
 should exit cleanly.

Additional Information:
 I've also attached a patch to fix the problem.

Comment 1 James Antill 2002-09-04 15:54:21 UTC
Created attachment 74884 [details]
Source of program to show bug.

Comment 2 James Antill 2002-09-04 15:55:57 UTC
Created attachment 74885 [details]
Proposed patch.

Comment 3 Owen Taylor 2002-09-04 16:31:27 UTC
Filed upstream as:

 http://bugzilla.gnome.org/show_bug.cgi?id=92492

Comment 4 Owen Taylor 2002-11-01 01:34:49 UTC
Not going to fix this in advance of upstream.