[xmlsec] Mscrypto IS patch
Wouter
wsh at xs4all.nl
Mon Sep 22 12:38:29 PDT 2003
>
> 2) src/buffer.c
> second change seems OK to me but the first one is not. If
> j == size
> after
> processing the first char then the would have problems
> with res[j]
> for second char:
>
> for(i = j = 0, iCol = 0; ((i < bufSize) && (j < size));
> ++i, iCol +=
> 2) {
> ...
>
> res[j++] = xmlSecBinaryHexChar1(ch);
> - if(j >= size) {
> + if(j > size) {
> break;
> }
>
>
>
> res[j++] = xmlSecBinaryHexChar2(ch);
> - if(j >= size) {
> + if(j > size) {
> break;
> }
> }
>
> I have reverted the first change back.
OK, it was an error I got at the third change that triggered these
changes.
> 11) src/mscrypto/bignum.c, xmlSecMSCryptoDecToHex(),
> xmlSecMSCryptoHexToDec() and friends
> Sorry, I don't understand what you wrote in these functions. IMHO,
> there were too many code and
> too many mallocs for such a simple task. I rewrote both functions.
> Please check that I did not break
> break your tests.
Could you explain the approach you've taken with the newly written code
here? I've taken a look why they are not working, but excexpt for a
wrong assertion at line 198 (should be become xmlSecAssert2(outBase <=
sizeof(xmlSecMSCryptoRevLookupTable), NULL);) I couldn't find a trivial
error, nor could I understand what the code does.
Wouter
More information about the xmlsec
mailing list