Ticket #2249: 0001-fix-crash.patch

File 0001-fix-crash.patch, 902 bytes (added by ossi, 9 years ago)

fix it!

  • lib/strutil/strutil8bit.c

    From 0bb1574a5d1f3b350f8e666679f6f205a8143be5 Mon Sep 17 00:00:00 2001
    From: Oswald Buddenhagen <ossi@kde.org>
    Date: Wed, 30 Jun 2010 00:46:03 +0200
    Subject: [PATCH] fix crash
    
    ---
     lib/strutil/strutil8bit.c |   10 ++++------
     1 files changed, 4 insertions(+), 6 deletions(-)
    
    diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c
    index 644f355..8f3cb70 100644
    a b str_8bit_release_search_needle (char *needle, int case_sen) 
    577577static char * 
    578578str_8bit_strdown (const char *str) 
    579579{ 
    580     char *rets; 
     580    char *rets, *p; 
    581581 
    582582    rets = g_strdup (str); 
    583583    if (rets == NULL) 
    584584        return NULL; 
    585585 
    586     while (*rets != '\0') 
    587     { 
    588         *rets = char_tolower (*rets); 
    589         rets++; 
    590     } 
     586    for (p = rets; *p != '\0'; p++) 
     587        *p = char_tolower (*p); 
     588 
    591589    return rets; 
    592590} 
    593591