nss: fix assert when building against debug nss #91

Merged
merged 1 commit into from Mar 6, 2017

Conversation

Projects
None yet
2 participants
@vmiklos
Contributor

vmiklos commented Mar 6, 2017

Due to reading uninitialized memory. gdb says:

Assertion failure: dest == NULL || dest->data == NULL, at secasn1e.c:1483
Program received signal SIGABRT, Aborted.
0x00007ffff74748d7 in raise () from /lib64/libc.so.6
(gdb) up
#1  0x00007ffff7475caa in abort () from /lib64/libc.so.6
(gdb)
#2  0x00007fffe57f96ae in PR_Assert (s=0x7fffe1cbf298 "dest == NULL || dest->data == NULL", file=0x7fffe1cbef60 "secasn1e.c", ln=1483) at ../../../../pr/src/io/prlog.c:553
553         abort();
(gdb)
#3  0x00007fffe1cb1941 in SEC_ASN1EncodeItem_Util (poolp=0x0, dest=0x7fffffff95f0, src=0x7fffffff9530, theTemplate=0x7fffe55ae180 <DSA_SignatureTemplate>) at secasn1e.c:1483
1483        PORT_Assert(dest == NULL || dest->data == NULL);
nss: fix assert when building against debug nss
Due to reading uninitialized memory. gdb says:

    Assertion failure: dest == NULL || dest->data == NULL, at secasn1e.c:1483
    Program received signal SIGABRT, Aborted.
    0x00007ffff74748d7 in raise () from /lib64/libc.so.6
    (gdb) up
    #1  0x00007ffff7475caa in abort () from /lib64/libc.so.6
    (gdb)
    #2  0x00007fffe57f96ae in PR_Assert (s=0x7fffe1cbf298 "dest == NULL || dest->data == NULL", file=0x7fffe1cbef60 "secasn1e.c", ln=1483) at ../../../../pr/src/io/prlog.c:553
    553         abort();
    (gdb)
    #3  0x00007fffe1cb1941 in SEC_ASN1EncodeItem_Util (poolp=0x0, dest=0x7fffffff95f0, src=0x7fffffff9530, theTemplate=0x7fffe55ae180 <DSA_SignatureTemplate>) at secasn1e.c:1483
    1483        PORT_Assert(dest == NULL || dest->data == NULL);

@lsh123 lsh123 merged commit a7528e7 into lsh123:master Mar 6, 2017

@vmiklos vmiklos deleted the vmiklos:nss-ecdsa-memset branch Mar 13, 2017

vmiklos added a commit to vmiklos/xmlsec that referenced this pull request Apr 20, 2017

nss: fix assert when building against debug nss (#91)
Due to reading uninitialized memory. gdb says:

    Assertion failure: dest == NULL || dest->data == NULL, at secasn1e.c:1483
    Program received signal SIGABRT, Aborted.
    0x00007ffff74748d7 in raise () from /lib64/libc.so.6
    (gdb) up
    #1  0x00007ffff7475caa in abort () from /lib64/libc.so.6
    (gdb)
    #2  0x00007fffe57f96ae in PR_Assert (s=0x7fffe1cbf298 "dest == NULL || dest->data == NULL", file=0x7fffe1cbef60 "secasn1e.c", ln=1483) at ../../../../pr/src/io/prlog.c:553
    553         abort();
    (gdb)
    #3  0x00007fffe1cb1941 in SEC_ASN1EncodeItem_Util (poolp=0x0, dest=0x7fffffff95f0, src=0x7fffffff9530, theTemplate=0x7fffe55ae180 <DSA_SignatureTemplate>) at secasn1e.c:1483
    1483        PORT_Assert(dest == NULL || dest->data == NULL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment