mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-23 15:07:03 +01:00
* mpicoder.c (do_get_buffer): Don't remove leading zeros if the
MPI is marked as protected.
This commit is contained in:
parent
29e3108bb9
commit
a4750ea3de
@ -1,3 +1,8 @@
|
|||||||
|
2002-08-13 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* mpicoder.c (do_get_buffer): Don't remove leading zeros if the
|
||||||
|
MPI is marked as protected.
|
||||||
|
|
||||||
2002-08-02 Timo Schulz <ts@winpt.org>
|
2002-08-02 Timo Schulz <ts@winpt.org>
|
||||||
|
|
||||||
* mpicoder.c: Add a '\n' to all log_bug functions.
|
* mpicoder.c: Add a '\n' to all log_bug functions.
|
||||||
|
@ -363,12 +363,15 @@ do_get_buffer( MPI a, unsigned *nbytes, int *sign, int force_secure )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this is sub-optimal but we need to do the shift oepration because
|
if (!mpi_is_protected (a))
|
||||||
* the caller has to free the returned buffer */
|
{
|
||||||
for(p=buffer; !*p && *nbytes; p++, --*nbytes )
|
/* this is sub-optimal but we need to do the shift operation
|
||||||
;
|
* because the caller has to free the returned buffer */
|
||||||
if( p != buffer )
|
for(p=buffer; !*p && *nbytes; p++, --*nbytes )
|
||||||
memmove(buffer,p, *nbytes);
|
;
|
||||||
|
if( p != buffer )
|
||||||
|
memmove(buffer,p, *nbytes);
|
||||||
|
}
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user