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

randombit / botan / 11239525935

08 Oct 2024 04:15PM UTC coverage: 91.004% (+0.002%) from 91.002%
11239525935

push

github

web-flow
Merge pull request #4358 from randombit/jack/fix-fuzzer

Fix mp_redc_crandall fuzzer

89421 of 98261 relevant lines covered (91.0%)

8856250.94 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/pkix_types.h>
11

12
void fuzz(std::span<const uint8_t> in) {
140✔
13
   Botan::X509_DN dn1;
140✔
14
   Botan::X509_DN dn2;
140✔
15

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

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

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

34
      // it is not the case that both are less than the other
35
      FUZZER_ASSERT_TRUE(!lt1 || !lt2);
×
36
   }
37
}
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