diff options
Diffstat (limited to 'payloads/libpayload/libc/lar.c')
-rw-r--r-- | payloads/libpayload/libc/lar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/lar.c b/payloads/libpayload/libc/lar.c index 65b503d1c8..6ae4052039 100644 --- a/payloads/libpayload/libc/lar.c +++ b/payloads/libpayload/libc/lar.c @@ -218,6 +218,16 @@ int larstat(struct LAR *lar, const char *path, struct larstat *buf) return 0; } +void * larfptr(struct LAR *lar, const char *filename) +{ + struct lar_header *header = get_header_by_name(lar, filename); + + if (header == NULL) + return NULL; + + return (void *) ((u8 *) header + ntohl(header->offset)); +} + struct LFILE * lfopen(struct LAR *lar, const char *filename) { struct LFILE *file; |