Changeset 2894 for releases

Show
Ignore:
Timestamp:
04/26/06 09:58:54 (3 years ago)
Author:
aj
Message:

fix off by one bug.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • releases/opensc-0.11.0/src/tools/opensc-explorer.c

    r2876 r2894  
    944944        printf("in: %i; %s\n", offs, in_str); 
    945945        if (*in_str=='\"')   { 
    946                 in_len = strlen(in_str)-2 > sizeof(buf) ? sizeof(buf) : strlen(in_str)-2; 
     946                in_len = strlen(in_str)-2 >= sizeof(buf) ? sizeof(buf)-1 : strlen(in_str)-2; 
    947947                strncpy((char *) buf, in_str+1, in_len); 
    948948        } else {