From 392804e7ee2753cea831503fbdbafc2d7780862a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 9 Apr 2010 14:04:10 -0700 Subject: [PATCH] ofproto: Maximum value of "int" is INT_MAX, not UINT32_MAX. This bug seems to be dormant at the moment, since the -1 gets passed through unchanged to do_send_packet_in() and then to make_packet_in() and then gets converted to SIZE_MAX as part of the MIN invocation in that function. It is still better to fix it. Reported-by: Jean Tourrilhes --- ofproto/ofproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 0f4ba6844..83dc99d82 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3702,7 +3702,7 @@ send_packet_in_miss(struct ofpbuf *packet, void *p_) ? pktbuf_get_null() : pktbuf_save(pb, &payload, msg->port)); int send_len = (buffer_id != UINT32_MAX ? ofconn->miss_send_len - : UINT32_MAX); + : INT_MAX); do_send_packet_in(ofconn, buffer_id, packet, send_len); } } -- 2.43.0