Skip to content

Commit

Permalink
Fix off-by-one error allocating space for protos[]. Reported by
Browse files Browse the repository at this point in the history
OSS-Fuzz.
  • Loading branch information
sobomax committed Mar 23, 2023
1 parent 371dd7d commit c69513f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* protocols, because we never know what kind of traffic we receive and have
* to print its name
*/
struct proto_info protos[PROTO_LAST - PROTO_NONE] = {
struct proto_info protos[PROTO_LAST - PROTO_NONE + 1] = {
{ .name = NULL, .default_rfc_port = 0 }, /* PROTO_NONE */

{ .name = "udp", .default_rfc_port = 5060 }, /* PROTO_UDP */
Expand Down

0 comments on commit c69513f

Please sign in to comment.