Merged,
Thanks!

Maxim.

On 09/17/2014 04:39 AM, Mike Holmes wrote:
Signed-off-by: Mike Holmes <[email protected]>
---

The for loop exitis with i=50 if raw_sockets[i].fd == 0 is not hit in the loop
Guard against this correctly by replacing the spcific test for 49 with
greater than 49 which is the real error case for over running the buffer
raw_sockets[i].fd


  platform/linux-generic/odp_packet_socket.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platform/linux-generic/odp_packet_socket.c 
b/platform/linux-generic/odp_packet_socket.c
index d1ea087..279a0cb 100644
--- a/platform/linux-generic/odp_packet_socket.c
+++ b/platform/linux-generic/odp_packet_socket.c
@@ -141,7 +141,7 @@ static int add_raw_fd(const char *netdev, int fd)
                        break;
        }
- if (i == (MAX_RAW_SOCKETS_NETDEVS - 1)) {
+       if (i > (MAX_RAW_SOCKETS_NETDEVS - 1)) {
                ODP_ERR("too many sockets\n");
                return -1;
        }


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to