Changeset cd4723c


Ignore:
Timestamp:
2007-04-15T21:59:52Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c2fb3809
Parents:
552e641
Message:

More format string problems.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r552e641 rcd4723c  
    536536        /* *sigh* */
    537537       
    538         imc_log( ic, reply->str );
     538        imc_log( ic, "%s", reply->str );
    539539        g_string_free( reply, TRUE );
    540540       
  • protocols/oscar/oscar.c

    r552e641 rcd4723c  
    12641264        guint16 chan, nummissed, reason;
    12651265        aim_userinfo_t *userinfo;
    1266         char buf[1024];
    12671266
    12681267        va_start(ap, fr);
     
    12761275                case 0:
    12771276                        /* Invalid (0) */
    1278                         g_snprintf(buf,
    1279                                    sizeof(buf),
     1277                        imc_error(sess->aux_data,
    12801278                                   nummissed == 1 ?
    12811279                                   _("You missed %d message from %s because it was invalid.") :
     
    12861284                case 1:
    12871285                        /* Message too large */
    1288                         g_snprintf(buf,
    1289                                    sizeof(buf),
     1286                        imc_error(sess->aux_data,
    12901287                                   nummissed == 1 ?
    12911288                                   _("You missed %d message from %s because it was too large.") :
     
    12961293                case 2:
    12971294                        /* Rate exceeded */
    1298                         g_snprintf(buf,
    1299                                    sizeof(buf),
     1295                        imc_error(sess->aux_data,
    13001296                                   nummissed == 1 ?
    13011297                                   _("You missed %d message from %s because the rate limit has been exceeded.") :
     
    13061302                case 3:
    13071303                        /* Evil Sender */
    1308                         g_snprintf(buf,
    1309                                    sizeof(buf),
     1304                        imc_error(sess->aux_data,
    13101305                                   nummissed == 1 ?
    13111306                                   _("You missed %d message from %s because it was too evil.") :
     
    13161311                case 4:
    13171312                        /* Evil Receiver */
    1318                         g_snprintf(buf,
    1319                                    sizeof(buf),
     1313                        imc_error(sess->aux_data,
    13201314                                   nummissed == 1 ?
    13211315                                   _("You missed %d message from %s because you are too evil.") :
     
    13251319                        break;
    13261320                default:
    1327                         g_snprintf(buf,
    1328                                    sizeof(buf),
     1321                        imc_error(sess->aux_data,
    13291322                                   nummissed == 1 ?
    13301323                                   _("You missed %d message from %s for unknown reasons.") :
     
    13341327                        break;
    13351328        }
    1336         imc_error(sess->aux_data, buf);
    13371329
    13381330        return 1;
     
    19261918
    19271919        if (strlen(message) > od->rights.maxawaymsglen) {
    1928                 gchar *errstr;
    1929 
    1930                 errstr = g_strdup_printf("Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen);
    1931 
    1932                 imc_error(ic, errstr);
    1933 
    1934                 g_free(errstr);
     1920                imc_error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen);
    19351921        }
    19361922
  • protocols/yahoo/yahoo.c

    r552e641 rcd4723c  
    518518        {
    519519                char *errstr;
    520                 char *s;
    521520               
    522521                yd->logged_in = FALSE;
     
    539538               
    540539                if( url && *url )
    541                 {
    542                         s = g_malloc( strlen( "Error %d (%s). See %s for more information." ) + strlen( url ) + strlen( errstr ) + 16 );
    543                         sprintf( s, "Error %d (%s). See %s for more information.", succ, errstr, url );
    544                 }
     540                        imc_error( ic, "Error %d (%s). See %s for more information.", succ, errstr, url );
    545541                else
    546                 {
    547                         s = g_malloc( strlen( "Error %d (%s)" ) + strlen( errstr ) + 16 );
    548                         sprintf( s, "Error %d (%s)", succ, errstr );
    549                 }
    550                
    551                 if( yd->logged_in )
    552                         imc_error( ic, s );
    553                 else
    554                         imc_error( ic, s );
    555                
    556                 g_free( s );
     542                        imc_error( ic, "Error %d (%s)", succ, errstr );
    557543               
    558544                imc_logout( ic );
Note: See TracChangeset for help on using the changeset viewer.