• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 5134090420

31 May 2023 03:12PM UTC coverage: 91.721% (-0.3%) from 91.995%
5134090420

push

github

randombit
Merge GH #3565 Disable noisy/pointless pylint warnings

76048 of 82912 relevant lines covered (91.72%)

11755290.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/src/fuzzer/x509_dn.cpp
1
/*
2
* (C) 2019 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6

7
#include "fuzzers.h"
8

9
#include <botan/ber_dec.h>
10
#include <botan/hex.h>
11
#include <botan/pkix_types.h>
12

13
void fuzz(const uint8_t in[], size_t len) {
140✔
14
   Botan::X509_DN dn1;
140✔
15
   Botan::X509_DN dn2;
140✔
16

17
   try {
140✔
18
      Botan::BER_Decoder ber(in, len);
140✔
19
      dn1.decode_from(ber);
140✔
20
      dn2.decode_from(ber);
×
21
   } catch(...) {
280✔
22
      return;
140✔
23
   }
140✔
24

25
   const bool eq = dn1 == dn2;
×
26
   const bool lt1 = dn1 < dn2;
×
27
   const bool lt2 = dn2 < dn1;
×
28

29
   if(lt1 == false && lt2 == false) {
×
30
      FUZZER_ASSERT_TRUE(eq);
×
31
   } else {
32
      // one is less than the other
33
      FUZZER_ASSERT_TRUE(lt1 || lt2);
×
34

35
      // it is not the case that both are less than the other
36
      FUZZER_ASSERT_TRUE(!lt1 || !lt2);
×
37
   }
38
}
140✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc