Debian Codegraph @

debian/tests/unicode-strings

raw
1 #!/bin/bash
2
3 DUMPASN1=${1:-dumpasn1}
4
5 # this test evaluates a certificate extracted from the PKCS7 object
6 # https://www.grfc.ru/upload/medialibrary/eec/016301.p7b as found in
7 # https://bugs.debian.org/840771
8
9 # Without debian/patches/bug840771.patch, valgrind will likely fail with:
10
11 # 99 58: SET {
12 # 101 56: SEQUENCE {
13 # 103 3: OBJECT IDENTIFIER streetAddress (2 5 4 9)
14 # 108 49: UTF8String
15 # ==2816751== Conditional jump or move depends on uninitialised value(s)
16 # ==2816751== at 0x4840D5E: wcsnlen (in /usr/lib/…/valgrind/vgpreload_memcheck-amd64-linux.so)
17 # ==2816751== by 0x491E116: wcsrtombs (wcsrtombs.c:104)
18 # ==2816751== by 0x48B3FE0: wcstombs (wcstombs.c:34)
19 # ==2816751== by 0x10BCD2: displayUnicode (in …/dumpasn1/dumpasn1)
20 # ==2816751== by 0x10CFA1: displayString (in …/dumpasn1/dumpasn1)
21 # ==2816751== by 0x10F3D1: printASN1object (in …/dumpasn1/dumpasn1)
22 # ==2816751== by 0x10FBF2: printAsn1 (in …/dumpasn1/dumpasn1)
23 # ==2816751== by 0x10E27E: printConstructed (in …/dumpasn1/dumpasn1)
24 # ==2816751== by 0x10E8CF: printASN1object (in …/dumpasn1/dumpasn1)
25 # ==2816751== by 0x10FBF2: printAsn1 (in …/dumpasn1/dumpasn1)
26 # ==2816751== by 0x10E27E: printConstructed (in …/dumpasn1/dumpasn1)
27 # ==2816751== by 0x10E8CF: printASN1object (in …/dumpasn1/dumpasn1)
28 # ==2816751==
29 # : '............ .... .. 7 .... 15'
30 # : }
31 # : }
32
33
34 < debian/test-data/unicode-strings.crt grep -v ^- | base64 -d | \
35 valgrind --error-exitcode=17 -- "$DUMPASN1" -