Signed-off-by: Jan Friesse <[email protected]>
---
 exec/totemconfig.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index a547aba..65a061b 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -467,6 +467,12 @@ extern int totem_config_read (
        }
 
        if (icmap_get_string("totem.rrp_mode", &str) == CS_OK) {
+               if (strlen(str) >= TOTEM_RRP_MODE_BYTES) {
+                       *error_string = "totem.rrp_mode is too long";
+                       free(str);
+
+                       return -1;
+               }
                strcpy (totem_config->rrp_mode, str);
                free(str);
        }
-- 
1.7.1

_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss

Reply via email to