Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 388610083829576e5aa728d32e45e8efbdadf1eb |
|---|---|
| Date: | 2008-11-14 17:29:23 |
| User: | stephan |
| Comment: | fixed a potential use of an invalid string pointer. |
Changes
Changes to src/c11n_io_handler_expat.c
| Old (a76b051525747897) | New (678543af22486941) | |||
|---|---|---|---|---|
| 1 | #include "s11n.net/c11n/io/c11n_io.h" | 1 | #include "s11n.net/c11n/io/c11n_io.h" | |
| 2 | #include "s11n.net/c11n/io/c11n_io_handler_expat.h" | 2 | #include "s11n.net/c11n/io/c11n_io_handler_expat.h" | |
| 3 | #include "s11n.net/c11n/detail/memblob.h" | 3 | #include "s11n.net/c11n/detail/memblob.h" | |
| 4 | 4 | |||
| 5 | #include <stdlib.h> | 5 | #include <stdlib.h> | |
| 115 hidden lines | ||||
| 121 | if( ! expat_save_node( self, chi.node ) ) return false; | 121 | if( ! expat_save_node( self, chi.node ) ) return false; | |
| 122 | c11n_node_iter_next_c(&chi); | 122 | c11n_node_iter_next_c(&chi); | |
| 123 | } while( c11n_node_iter_isvalid_c( &chi ) ); | 123 | } while( c11n_node_iter_isvalid_c( &chi ) ); | |
| 124 | --impl->indentLevel; | 124 | --impl->indentLevel; | |
| 125 | memblob_truncate( impl->tabs, impl->indentLevel, 0 ); | 125 | memblob_truncate( impl->tabs, impl->indentLevel, 0 ); | |
| > | 126 | tabs = memblob_size(impl->tabs) ? memblob_bufferc( impl->tabs ) : ""; /* might have been invalidated. */ | ||
| 126 | } | 127 | } | |
| 127 | #endif | 128 | #endif | |
| 128 | WF( dest, "%s</%s>\n", tabs, c11n_node_get_name( src ) ); | 129 | WF( dest, "%s</%s>\n", tabs, c11n_node_get_name( src ) ); | |
| 129 | #undef WF | 130 | #undef WF | |
| 130 | #undef W | 131 | #undef W | |
| 172 hidden lines | ||||
| 303 | 304 | |||
| 304 | c11n_io_handler * c11n_io_handler_factory_expat( c11n_const_string_t ignored ) | 305 | c11n_io_handler * c11n_io_handler_factory_expat( c11n_const_string_t ignored ) | |
| 305 | { | 306 | { | |
| 306 | return c11n_io_handler_create_expat(); | 307 | return c11n_io_handler_create_expat(); | |
| 307 | } | 308 | } | |