Commit Graph

7 Commits

Author SHA1 Message Date
Nick Mathewson cc397449fc Use __attribute__((fallthrough)) rather than magic GCC comments.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
2020-05-06 16:51:11 -04:00
Nick Mathewson f160212ee8 When parsing tokens, reject early on spurious keys. 2020-02-05 11:57:31 -05:00
Nick Mathewson 9e1085c924 When parsing, reject >1024-bit RSA private keys sooner.
Private-key validation is fairly expensive for long keys in openssl,
so we need to avoid it sooner.
2020-02-05 11:11:35 -05:00
Nick Mathewson efe55b8898 Bump copyright date to 2019. 2019-01-16 12:32:32 -05:00
Nick Mathewson e9ff3e7d4a Merge branch 'bug28202_033' into bug28202_035 2018-10-25 09:16:08 -04:00
Nick Mathewson 35db3f8162 Extract addr-policy parsing code. 2018-10-01 11:17:19 -05:00
Nick Mathewson 6785aa4010 Move routerparse and parsecommon to their own module. 2018-10-01 00:04:06 -05:00