Branch: Tag:

2013-08-13

2013-08-13 12:30:29 by Martin Nilsson <nilsson@opera.com>

Allow calls to unpad with strings that are not of integral numbers of blocks, if there is backlog data that makes up for it.

950:    int m = 0;    struct pike_string * ret;    -  len = str->len; +  len = str->len + THIS->backlog_len;    if( len % THIS->block_size) -  Pike_error("String must be integral numbers of blocks.\n"); +  Pike_error("Total data size must be integral numbers of blocks.\n");       if( method!=NULL )    {
961:    args--;    }    -  safe_apply(THIS->object, "crypt", 1); +  f_Proxy_crypt(1);    if (TYPEOF(Pike_sp[-1]) != T_STRING)    Pike_error("crypt() did not return string.\n");    if (Pike_sp[-1].u.string->len != len)