mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
fix valgrind-noted empty array cruft.
This commit is contained in:
parent
1e0db1fca7
commit
956e9c540f
1 changed files with 9 additions and 6 deletions
|
@ -202,13 +202,16 @@ linux_dutil_loadStream( XW_DUtilCtxt* duc, const XP_UCHAR* key,
|
|||
{
|
||||
XP_U16 len = 0;
|
||||
linux_dutil_loadPtr( duc, key, NULL, &len );
|
||||
XP_U8 buf[len];
|
||||
linux_dutil_loadPtr( duc, key, buf, &len );
|
||||
if ( 0 < len ) {
|
||||
XP_U8 buf[len];
|
||||
linux_dutil_loadPtr( duc, key, buf, &len );
|
||||
XP_ASSERT( buf[len-1] == '\0' );
|
||||
|
||||
gsize out_len;
|
||||
guchar* txt = g_base64_decode( (const gchar*)buf, &out_len );
|
||||
stream_putBytes( stream, txt, out_len );
|
||||
g_free( txt );
|
||||
gsize out_len;
|
||||
guchar* txt = g_base64_decode( (const gchar*)buf, &out_len ); /* BAD */
|
||||
stream_putBytes( stream, txt, out_len );
|
||||
g_free( txt );
|
||||
}
|
||||
|
||||
XP_LOGF( "%s(key=%s) => len: %d", __func__, key, stream_getSize(stream) );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue