Changeset 5183


Ignore:
Timestamp:
May 6, 2011, 12:57:06 AM (8 years ago)
Author:
Admin
Message:

Some small fixes.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/cscrypt/md5.c

    r3194 r5183  
    7171 * Valid values are  1 (fastest/largest) to 3 (smallest/slowest).
    7272 */
    73 #define MD5_SIZE_OVER_SPEED 3
     73#define MD5_SIZE_OVER_SPEED 1
    7474
    7575/**********************************************************************/
     
    193193    context->state[2] = 0x98badcfe;
    194194    context->state[3] = 0x10325476;
     195    memset(context->buffer, 0, sizeof(context->buffer));
    195196}
    196197
     
    541542char * __md5_crypt( const char *pw, const char *salt, char *passwd )
    542543{
    543     /* Static stuff */
    544     static const char *sp, *ep;
    545     static char *p;
     544    const char *sp, *ep;
     545    char *p;
    546546
    547547    unsigned char   final[17];  /* final[16] exists only to aid in looping */
  • trunk/oscam-http-helpers.c

    r5166 r5183  
    334334    char *pch = authstring + 22;
    335335    char *pch2;
    336    
    337     pch = strtok (pch,",");
     336    char *save=NULL;
     337
     338    pch = strtok_r (pch,",",&save);
    338339    while (pch != NULL){
    339340        pch2 = pch;
     
    352353        username=parse_auth_value(pch2);
    353354      }
    354       pch = strtok (NULL, ",");
     355      pch = strtok_r (NULL, ",",&save);
    355356    }
    356357
  • trunk/oscam-http.c

    r5173 r5183  
    33343334        }
    33353335        if(authok == 0 && strlen(str1) > 50 && strncmp(str1, "Authorization:", 14) == 0 && strstr(str1, "Digest") != NULL) {
    3336             if(cs_realloc(&authheader, strlen(str1), -1))
    3337                 cs_strncpy(authheader, str1, strlen(str1) - 1);
     3336            if(cs_realloc(&authheader, strlen(str1) + 1, -1))
     3337                cs_strncpy(authheader, str1, strlen(str1));
    33383338            authok = check_auth(str1, method, path, expectednonce);
    33393339        }
  • trunk/oscam-simples.c

    r5092 r5183  
    627627    result[p_array_len*2] = '\0';
    628628    const unsigned char* p_end = p_array + p_array_len;
    629     size_t pos=0;
     629    uint32_t pos=0;
    630630    const unsigned char* p;
    631631    for( p = p_array; p != p_end; p++, pos+=2 ) {
Note: See TracChangeset for help on using the changeset viewer.