| … | |
… | |
| 674 | strlen(sandbox_lib) + 2); |
674 | strlen(sandbox_lib) + 2); |
| 675 | if (NULL == tmp_string) { |
675 | if (NULL == tmp_string) { |
| 676 | perror(">>> Out of memory (LD_PRELOAD)"); |
676 | perror(">>> Out of memory (LD_PRELOAD)"); |
| 677 | exit(1); |
677 | exit(1); |
| 678 | } |
678 | } |
| 679 | strncpy(tmp_string, sandbox_lib, sizeof(sandbox_lib)); |
679 | strncpy(tmp_string, sandbox_lib, strlen(sandbox_lib)); |
| 680 | strncat(tmp_string, " ", 1); |
680 | strncat(tmp_string, " ", 1); |
| 681 | strncat(tmp_string, getenv("LD_PRELOAD"), strlen(getenv("LD_PRELOAD"))); |
681 | strncat(tmp_string, getenv("LD_PRELOAD"), strlen(getenv("LD_PRELOAD"))); |
| 682 | setenv("LD_PRELOAD", tmp_string, 1); |
682 | setenv("LD_PRELOAD", tmp_string, 1); |
| 683 | free(tmp_string); |
683 | free(tmp_string); |
| 684 | } else { |
684 | } else { |