security_events: Fix error caused by DTD validation error
[asterisk/asterisk.git] / res / res_limit.c
index f3ec856..e883ff3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Asterisk -- A telephony toolkit for Linux.
+ * Asterisk -- An open source telephony toolkit.
  *
  * Resource limits
  * 
  * \author Tilghman Lesher <res_limit_200607@the-tilghman.com>
  */
 
+/*** MODULEINFO
+       <support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#define _XOPEN_SOURCE 600
-
 #include <ctype.h>
 #include <sys/time.h>
 #include <sys/resource.h>
@@ -179,7 +180,7 @@ static char *handle_cli_ulimit(struct ast_cli_entry *e, int cmd, struct ast_cli_
                                return CLI_FAILURE;
                        }
 
-                       sscanf(a->argv[2], "%d", &x);
+                       sscanf(a->argv[2], "%30d", &x);
                        rlimit.rlim_max = rlimit.rlim_cur = x;
                        setrlimit(resource, &rlimit);
                        return CLI_SUCCESS;