mirror of https://github.com/n1nj4sec/pupy.git
16 lines
408 B
C
16 lines
408 B
C
![]() |
#include <limits.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include "memfd.h"
|
||
|
|
||
|
char *__real_realpath(const char *path, char *resolved_path);
|
||
|
|
||
|
char *__wrap_realpath(const char *path, char *resolved_path) {
|
||
|
if (is_memfd_path(path)) {
|
||
|
memcpy(resolved_path, path, strlen(path) + 1);
|
||
|
return resolved_path;
|
||
|
}
|
||
|
|
||
|
return __real_realpath(path, resolved_path);
|
||
|
}
|