mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
Use size_t instead of int when calling sysctl(3).
Otherwise, it writes sizeof(size_t) bytes to &oldlen, smashing the stack.
This commit is contained in:
parent
f53ea7afd8
commit
60ec4d2901
1 changed files with 2 additions and 1 deletions
|
|
@ -323,7 +323,8 @@ int get_hardware_address(int sock,char *interface_name){
|
|||
#elif defined(__bsd__)
|
||||
/* King 2004 see ACKNOWLEDGEMENTS */
|
||||
|
||||
int mib[6], len;
|
||||
size_t len;
|
||||
int mib[6];
|
||||
char *buf;
|
||||
unsigned char *ptr;
|
||||
struct if_msghdr *ifm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue