Rizin
unix-like reverse engineering framework and cli tools
zip_source_zip.c File Reference
#include <stdlib.h>
#include "zipint.h"

Go to the source code of this file.

Functions

ZIP_EXTERN zip_source_tzip_source_zip_create (zip_t *srcza, zip_uint64_t srcidx, zip_flags_t flags, zip_uint64_t start, zip_int64_t len, zip_error_t *error)
 
ZIP_EXTERN zip_source_tzip_source_zip (zip_t *za, zip_t *srcza, zip_uint64_t srcidx, zip_flags_t flags, zip_uint64_t start, zip_int64_t len)
 

Function Documentation

◆ zip_source_zip()

ZIP_EXTERN zip_source_t* zip_source_zip ( zip_t za,
zip_t srcza,
zip_uint64_t  srcidx,
zip_flags_t  flags,
zip_uint64_t  start,
zip_int64_t  len 
)

Definition at line 57 of file zip_source_zip.c.

57  {
58  return zip_source_zip_create(srcza, srcidx, flags, start, len, &za->error);
59 }
size_t len
Definition: 6502dis.c:15
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
Definition: sflib.h:133
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
zip_error_t error
Definition: zipint.h:281
ZIP_EXTERN zip_source_t * zip_source_zip_create(zip_t *srcza, zip_uint64_t srcidx, zip_flags_t flags, zip_uint64_t start, zip_int64_t len, zip_error_t *error)
zip_t * za
Definition: ziptool.c:79

References zip::error, flags, len, start, za, and zip_source_zip_create().

Referenced by add_from_zip(), and merge_zip().

◆ zip_source_zip_create()

ZIP_EXTERN zip_source_t* zip_source_zip_create ( zip_t srcza,
zip_uint64_t  srcidx,
zip_flags_t  flags,
zip_uint64_t  start,
zip_int64_t  len,
zip_error_t error 
)

Definition at line 39 of file zip_source_zip.c.

39  {
40  if (len < -1) {
42  return NULL;
43  }
44 
45  if (len == -1)
46  len = 0;
47 
48  if (start == 0 && len == 0)
50  else
52 
53  return _zip_source_zip_new(srcza, srcidx, flags, start, (zip_uint64_t)len, NULL, error);
54 }
#define NULL
Definition: cris-opc.c:27
ZIP_EXTERN void zip_error_set(zip_error_t *_Nullable, int, int)
Definition: zip_error.c:126
#define ZIP_FL_COMPRESSED
Definition: zip.h:78
#define ZIP_ER_INVAL
Definition: zip.h:123
void error(const char *msg)
Definition: untgz.c:593
zip_source_t * _zip_source_zip_new(zip_t *srcza, zip_uint64_t srcidx, zip_flags_t flags, zip_uint64_t start, zip_uint64_t len, const char *password, zip_error_t *error)
uint64_t zip_uint64_t
Definition: zipconf.h:39

References _zip_source_zip_new(), error(), flags, len, NULL, start, ZIP_ER_INVAL, zip_error_set(), and ZIP_FL_COMPRESSED.

Referenced by zip_source_zip().