Changeset 8320a7a


Ignore:
Timestamp:
2006-09-17T15:30:35Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
51fdc45
Parents:
0383943
Message:

Strings passed to xml_text aren't necessarily \0-terminated, so don't count
on that anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    r0383943 r8320a7a  
    227227}
    228228
    229 static void xml_text( GMarkupParseContext *ctx, const gchar *text, gsize text_len, gpointer data, GError **error )
    230 {
     229static void xml_text( GMarkupParseContext *ctx, const gchar *text_orig, gsize text_len, gpointer data, GError **error )
     230{
     231        char text[text_len+1];
    231232        struct xml_parsedata *xd = data;
    232233        irc_t *irc = xd->irc;
     234       
     235        strncpy( text, text_orig, text_len );
     236        text[text_len] = 0;
    233237       
    234238        if( xd->pass_st < XML_PASS_OK )
Note: See TracChangeset for help on using the changeset viewer.