You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

  1. --- a/agent/mibgroup/host/hr_filesys.c
  2. +++ b/agent/mibgroup/host/hr_filesys.c
  3. @@ -322,13 +322,13 @@ var_hrfilesys(struct variable *vp,
  4. long_return = fsys_idx;
  5. return (u_char *) & long_return;
  6. case HRFSYS_MOUNT:
  7. - snprintf(string, sizeof(string), HRFS_entry->HRFS_mount);
  8. + snprintf(string, sizeof(string), "%s", HRFS_entry->HRFS_mount);
  9. string[ sizeof(string)-1 ] = 0;
  10. *var_len = strlen(string);
  11. return (u_char *) string;
  12. case HRFSYS_RMOUNT:
  13. if (Check_HR_FileSys_NFS()) {
  14. - snprintf(string, sizeof(string), HRFS_entry->HRFS_name);
  15. + snprintf(string, sizeof(string), "%s", HRFS_entry->HRFS_name);
  16. string[ sizeof(string)-1 ] = 0;
  17. } else
  18. string[0] = '\0';
  19. --- a/agent/mibgroup/ucd-snmp/extensible.c
  20. +++ b/agent/mibgroup/ucd-snmp/extensible.c
  21. @@ -513,7 +513,7 @@ fixExecError(int action,
  22. }
  23. tmp = *((long *) var_val);
  24. if ((tmp == 1) && (action == COMMIT) && (exten->fixcmd[0] != 0)) {
  25. - sprintf(ex.command, exten->fixcmd);
  26. + sprintf(ex.command, "%s", exten->fixcmd);
  27. if ((fd = get_exec_output(&ex)) != -1) {
  28. file = fdopen(fd, "r");
  29. while (fgets(ex.output, sizeof(ex.output), file) != NULL);