Changeset 17470


Ignore:
Timestamp:
08/10/12 19:02:51 (11 years ago)
Author:
nit
Message:

[titan] fixes

Location:
titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek.h

    r17468 r17470  
    728728                struct splitstr* ret1 = NULL;
    729729                ret1 = strsplit(link, ";", &count);
    730                 if(ret1 != NULL)
     730                if(ret1 != NULL && count >= 4)
    731731                {
    732732                        link = ostrcat(ret1[0].part, NULL, 0, 0);
     
    887887                int hlen = 0;
    888888
    889                 if(ret1 != NULL)
     889                if(ret1 != NULL && count >= 2)
    890890                {
    891891//                      printf("ret1[1].part=%s\n", (ret1[1]).part);
    892                         hlen = strlen((ret1[1]).part);
     892                        hlen = strlen(ret1[1].part);
    893893                        tmpstr_uni = unhexlify(ret1[1].part);
    894894                }
  • titan/titan/rc4.h

    r17469 r17470  
    99};
    1010
    11 #define SWAPRC4(a,b) { unsigned char temp; temp = (a); (a) = (b); (b) = temp; }
     11#define SWAPRC4(a, b) { unsigned char temp; temp = (a); (a) = (b); (b) = temp; }
    1212
    1313void rc4init(struct rc4ctx *ctx, char *key, size_t keylen)
     
    1616        unsigned char j = 0;
    1717
     18        if(key == NULL) return;
     19
    1820        for(i = 0; i < sizeof(ctx->S); i++)
    19         {
    2021                ctx->S[i] = i;
    21         }
    2222   
    2323        for(i = 0; i < sizeof(ctx->S); i++)
     
    3131{
    3232        unsigned int i;
     33
     34        if(data == NULL) return;
    3335
    3436        ctx->i = 0;
Note: See TracChangeset for help on using the changeset viewer.