[so] [tema2]Probleme biblioteca
Radu Coman
radu.coman.c at gmail.com
Sun Apr 10 13:09:49 EEST 2011
2011/4/10 Adrian Scoica <adrian.scoica at gmail.com>
> Nu folosesc strcpy, trimit direct memoria partajata functiei de decriptare.
>>
>> mem - memoria partajata
>> rez - char[1000]
>> int * size = (int*)mem;
>> dim = decrypt_base64((char*)mem + 4, *size, rez);
>> memcpy((char*)mem + 4, rez, dim);
>>
>> Nu imi dau seama care este problema, pe masina virtuala locala am primit o
>> singura data eroarea, iar pe VMChecker primesc mereu la 2-4 teste. In rest
>> totul merge ok.
>>
>>
> Dar tu-l pui inapoi pe "dim" la inceputul memoriei partajate sau ramane
> dimensiunea veche de dinainte de decriptare?
>
Da il pun,
*size = dim;
Am uitat sa includ si bucata asta mai sus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20110410/c9793a82/attachment.htm>
More information about the so
mailing list