NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/42462: proplib should give a parse error on <real>



>Number:         42462
>Category:       bin
>Synopsis:       proplib should give a parse error on <real>
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 16 17:05:00 +0000 2009
>Originator:     Matthew Sporleder
>Release:        5.0.1
>Organization:
mspo.com
>Environment:
NetBSD fester 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Jul 30 01:39:11 UTC 2009  
builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-1-RELEASE/i386/200907292356Z-obj/home/builds/ab/netbsd-5-0-1-RELEASE/src/sys/arch/i386/compile/GENERIC
 i386
>Description:
Using a <real> element in a property list causes silent failure.  A parse 
error, or something, would be really helpful in this situation.
>How-To-Repeat:
#include <stdio.h>
#include <prop/proplib.h>

int main (int argc, char *argv[])
{
        prop_dictionary_t pl;
        pl = prop_dictionary_internalize_from_file( argv[1] );
        if ( pl == NULL ) { return 1; }
        prop_dictionary_externalize_to_file( pl, argv[2] );
        return 0;
}


----

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
        <key>NSNavSidebarWidth</key>
        <real>120</real>
        <key>NSTableView Columns NSNavOutlineColumnSettings.v1</key>
        <array>
                <data>
                foo
                </data>
                <string>118</string>
        </array>
        <key>enableCheckForUpdates</key>
        <true/>
        <key>enableLogToConsole</key>
        <false/>
</dict>
</plist>

---

./pl ./broken.plist ./out.plist

echo $?
1

???
>Fix:



Home | Main Index | Thread Index | Old Index