Ticket #2406: 0001-Initialize-mx_dup_ck-in-globals-with-MAX_DUP_CHK.patch
File 0001-Initialize-mx_dup_ck-in-globals-with-MAX_DUP_CHK.patch, 902 bytes (added by Pavel, on 11/30/16 at 10:41:00) |
Patch
|
-
From a82d7dc96c4a27cf36a655d66b3b30e1403d9e47 Mon Sep 17 00:00:00 2001
From: Pavel <paul.alex.zhdanov@gmail.com>
Date: Wed, 30 Nov 2016 03:40:36 -0500
Subject: [PATCH] Initialize mx_dup_ck in globals with MAX_DUP_CHK. It was
initialized with zero after memset. It was the cause of the system crash
because mx_dup_ck is used in CLR(ntransmitted % mx_dup_ck). Closes #2406.
---
cpukit/libmisc/shell/main_ping.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpukit/libmisc/shell/main_ping.c b/cpukit/libmisc/shell/main_ping.c
index 62b6cdd..61200a5 100644
a
|
b
|
static int rtems_shell_main_ping(int argc, char *argv[]) |
382 | 382 | return 1; |
383 | 383 | } |
384 | 384 | memset (globals, 0, sizeof (rtems_shell_globals_t)); |
| 385 | mx_dup_ck = MAX_DUP_CHK; |
385 | 386 | npackets = 5; |
386 | 387 | datalen = DEFDATALEN; |
387 | 388 | icmp_type_ = ICMP_ECHO; |
Download in other formats: