[so] [tema2]Probleme biblioteca

Radu Coman radu.coman.c at gmail.com
Sun Apr 10 10:02:45 EEST 2011


2011/4/10 Daniela Vatamanu <daniela.vatamanu at gmail.com>

> Buna,
>
> Eu am intalnit bad magic number _numai_ atunci cand nu faceam decriptarea
> bine.
> Ultima data inputul incepea de la mem+1 in loc de mem+sizeof(int), de
> exemplu.
>
> Dana
>
> 2011/4/10 <cristea.adryan at gmail.com>
> >
> > Salut,
> >
> > Poate copiezi sirul criptat cu strcpy dintr-un sir in altul.
> >
> > Daca acesta contine '\0' copierea nu se face decat pana la intalnirea
> caracterului.
> >
> > Poti incerca cu memcpy.
> >
> > Adi
> >
> > La data de , Radu Coman <radu.coman.c at gmail.com> a scris:
> > > Salut,
> > >
> > > Primesc uneori erori de genul:
> > >
> > > bad decrypt
> > > 2228:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad
> decrypt:evp_enc.c:330:
> > > error reading input file
> > > bad decrypt
> > > 2232:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad
> decrypt:evp_enc.c:330:
> > >
> > >
> > > bad magic number
> > > error reading input file
> > > error reading input file
> > > error reading input file
> > > error reading input file
> > > error reading input file
> > >
> > > Stie cineva de la ce ar putea fi?
> > >
> > > Multumesc,
> > > Radu
> > >
> > >
> > >
> > >
> > _______________________________________________
> > http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
> _______________________________________________
> http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
>



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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20110410/8be2bbdc/attachment-0001.htm>


More information about the so mailing list