Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
gd /
libgd /
Delete
Unzip
Name
Size
Permission
Date
Action
bmp.h
2.39
KB
-rw-rw-r--
2022-10-31 11:36
gd.c
72.21
KB
-rw-rw-r--
2022-10-31 11:36
gd.h
33.01
KB
-rw-rw-r--
2022-10-31 11:36
gd2copypal.c
1.32
KB
-rw-rw-r--
2022-10-31 11:36
gd2time.c
1.2
KB
-rw-rw-r--
2022-10-31 11:36
gd2topng.c
1.04
KB
-rw-rw-r--
2022-10-31 11:36
gd_bmp.c
25.8
KB
-rw-rw-r--
2022-10-31 11:36
gd_color_match.c
1.42
KB
-rw-rw-r--
2022-10-31 11:36
gd_crop.c
7.68
KB
-rw-rw-r--
2022-10-31 11:36
gd_errors.h
673
B
-rw-rw-r--
2022-10-31 11:36
gd_filter.c
12.52
KB
-rw-rw-r--
2022-10-31 11:36
gd_gd.c
5.2
KB
-rw-rw-r--
2022-10-31 11:36
gd_gd2.c
19.53
KB
-rw-rw-r--
2022-10-31 11:36
gd_gif_in.c
13.9
KB
-rw-rw-r--
2022-10-31 11:36
gd_gif_out.c
20.75
KB
-rw-rw-r--
2022-10-31 11:36
gd_intern.h
261
B
-rw-rw-r--
2022-10-31 11:36
gd_interpolation.c
69.57
KB
-rw-rw-r--
2022-10-31 11:36
gd_io.c
3.39
KB
-rw-rw-r--
2022-10-31 11:36
gd_io.h
1.05
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_dp.c
6.96
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_file.c
2.31
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_ss.c
2.66
KB
-rw-rw-r--
2022-10-31 11:36
gd_jpeg.c
26.3
KB
-rw-rw-r--
2022-10-31 11:36
gd_matrix.c
7.77
KB
-rw-rw-r--
2022-10-31 11:36
gd_pixelate.c
1.33
KB
-rw-rw-r--
2022-10-31 11:36
gd_png.c
22.61
KB
-rw-rw-r--
2022-10-31 11:36
gd_rotate.c
7.97
KB
-rw-rw-r--
2022-10-31 11:36
gd_security.c
662
B
-rw-rw-r--
2022-10-31 11:36
gd_ss.c
1.07
KB
-rw-rw-r--
2022-10-31 11:36
gd_tga.c
8.92
KB
-rw-rw-r--
2022-10-31 11:36
gd_tga.h
1.66
KB
-rw-rw-r--
2022-10-31 11:36
gd_topal.c
51.71
KB
-rw-rw-r--
2022-10-31 11:36
gd_transform.c
1.27
KB
-rw-rw-r--
2022-10-31 11:36
gd_wbmp.c
5.48
KB
-rw-rw-r--
2022-10-31 11:36
gd_webp.c
4.03
KB
-rw-rw-r--
2022-10-31 11:36
gd_xbm.c
5.27
KB
-rw-rw-r--
2022-10-31 11:36
gdcache.c
4.99
KB
-rw-rw-r--
2022-10-31 11:36
gdcache.h
2.68
KB
-rw-rw-r--
2022-10-31 11:36
gddemo.c
3.18
KB
-rw-rw-r--
2022-10-31 11:36
gdfontg.c
113.25
KB
-rw-rw-r--
2022-10-31 11:36
gdfontg.h
529
B
-rw-rw-r--
2022-10-31 11:36
gdfontl.c
108.5
KB
-rw-rw-r--
2022-10-31 11:36
gdfontl.h
527
B
-rw-rw-r--
2022-10-31 11:36
gdfontmb.c
79.24
KB
-rw-rw-r--
2022-10-31 11:36
gdfontmb.h
495
B
-rw-rw-r--
2022-10-31 11:36
gdfonts.c
69.46
KB
-rw-rw-r--
2022-10-31 11:36
gdfonts.h
491
B
-rw-rw-r--
2022-10-31 11:36
gdfontt.c
38.49
KB
-rw-rw-r--
2022-10-31 11:36
gdfontt.h
522
B
-rw-rw-r--
2022-10-31 11:36
gdft.c
32.75
KB
-rw-rw-r--
2022-10-31 11:36
gdhelpers.c
1.17
KB
-rw-rw-r--
2022-10-31 11:36
gdhelpers.h
1.54
KB
-rw-rw-r--
2022-10-31 11:36
gdkanji.c
12.01
KB
-rw-rw-r--
2022-10-31 11:36
gdparttopng.c
1.26
KB
-rw-rw-r--
2022-10-31 11:36
gdtables.c
5.45
KB
-rw-rw-r--
2022-10-31 11:36
gdtest.c
9.11
KB
-rw-rw-r--
2022-10-31 11:36
gdtestft.c
2.76
KB
-rw-rw-r--
2022-10-31 11:36
gdtopng.c
965
B
-rw-rw-r--
2022-10-31 11:36
gdxpm.c
3.21
KB
-rw-rw-r--
2022-10-31 11:36
jisx0208.h
69.68
KB
-rw-rw-r--
2022-10-31 11:36
pngtogd.c
967
B
-rw-rw-r--
2022-10-31 11:36
pngtogd2.c
1.17
KB
-rw-rw-r--
2022-10-31 11:36
testac.c
4.11
KB
-rw-rw-r--
2022-10-31 11:36
wbmp.c
6.79
KB
-rw-rw-r--
2022-10-31 11:36
wbmp.h
1.25
KB
-rw-rw-r--
2022-10-31 11:36
webpng.c
6.32
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
/* * io_dp.c * * Implements the dynamic pointer interface. * * Based on GD.pm code by Lincoln Stein for interfacing to libgd. * Added support for reading as well as support for 'tell' and 'seek'. * * As will all I/O modules, most functions are for local use only (called * via function pointers in the I/O context). * * gdDPExtractData is the exception to this: it will return the pointer to * the internal data, and reset the internal storage. * * Written/Modified 1999, Philip Warner. * */ #include <math.h> #include <string.h> #include <stdlib.h> #include "gd.h" #include "gdhelpers.h" #define TRUE 1 #define FALSE 0 /* this is used for creating images in main memory */ typedef struct dpStruct { void *data; int logicalSize; int realSize; int dataGood; int pos; int freeOK; } dynamicPtr; typedef struct dpIOCtx { gdIOCtx ctx; dynamicPtr *dp; } dpIOCtx; typedef struct dpIOCtx *dpIOCtxPtr; /* these functions operate on in-memory dynamic pointers */ static int allocDynamic (dynamicPtr * dp, int initialSize, void *data); static int appendDynamic (dynamicPtr * dp, const void *src, int size); static int gdReallocDynamic (dynamicPtr * dp, int required); static int trimDynamic (dynamicPtr * dp); static void gdFreeDynamicCtx (struct gdIOCtx *ctx); static dynamicPtr *newDynamic (int initialSize, void *data, int freeOKFlag); static int dynamicPutbuf (struct gdIOCtx *, const void *, int); static void dynamicPutchar (struct gdIOCtx *, int a); static int dynamicGetbuf (gdIOCtxPtr ctx, void *buf, int len); static int dynamicGetchar (gdIOCtxPtr ctx); static int dynamicSeek (struct gdIOCtx *, const int); static long dynamicTell (struct gdIOCtx *); /* return data as a dynamic pointer */ gdIOCtx * gdNewDynamicCtx (int initialSize, void *data) { return gdNewDynamicCtxEx(initialSize, data, 1); } gdIOCtx * gdNewDynamicCtxEx (int initialSize, void *data, int freeOKFlag) { dpIOCtx *ctx; dynamicPtr *dp; ctx = (dpIOCtx *) gdMalloc (sizeof (dpIOCtx)); dp = newDynamic(initialSize, data, freeOKFlag); ctx->dp = dp; ctx->ctx.getC = dynamicGetchar; ctx->ctx.putC = dynamicPutchar; ctx->ctx.getBuf = dynamicGetbuf; ctx->ctx.putBuf = dynamicPutbuf; ctx->ctx.seek = dynamicSeek; ctx->ctx.tell = dynamicTell; ctx->ctx.gd_free = gdFreeDynamicCtx; return (gdIOCtx *) ctx; } void * gdDPExtractData (struct gdIOCtx *ctx, int *size) { dynamicPtr *dp; dpIOCtx *dctx; void *data; dctx = (dpIOCtx *) ctx; dp = dctx->dp; /* clean up the data block and return it */ if (dp->dataGood) { trimDynamic (dp); *size = dp->logicalSize; data = dp->data; } else { *size = 0; data = NULL; if (dp->data != NULL && dp->freeOK) { gdFree(dp->data); } } dp->data = NULL; dp->realSize = 0; dp->logicalSize = 0; return data; } static void gdFreeDynamicCtx (struct gdIOCtx *ctx) { dynamicPtr *dp; dpIOCtx *dctx; dctx = (dpIOCtx *) ctx; dp = dctx->dp; gdFree(ctx); dp->realSize = 0; dp->logicalSize = 0; gdFree(dp); } static long dynamicTell (struct gdIOCtx *ctx) { dpIOCtx *dctx; dctx = (dpIOCtx *) ctx; return (dctx->dp->pos); } static int dynamicSeek (struct gdIOCtx *ctx, const int pos) { int bytesNeeded; dynamicPtr *dp; dpIOCtx *dctx; if (pos < 0) { return FALSE; } dctx = (dpIOCtx *) ctx; dp = dctx->dp; if (!dp->dataGood) { return FALSE; } bytesNeeded = pos; if (bytesNeeded > dp->realSize) { /* 2.0.21 */ if (!dp->freeOK) { return FALSE; } gdReallocDynamic (dp, dp->realSize * 2); } /* if we get here, we can be sure that we have enough bytes to copy safely */ /* Extend the logical size if we seek beyond EOF. */ if (pos > dp->logicalSize) { dp->logicalSize = pos; } dp->pos = pos; return TRUE; } /* return data as a dynamic pointer */ static dynamicPtr * newDynamic (int initialSize, void *data, int freeOKFlag) { dynamicPtr *dp; dp = (dynamicPtr *) gdMalloc (sizeof (dynamicPtr)); allocDynamic (dp, initialSize, data); dp->pos = 0; dp->freeOK = freeOKFlag; return dp; } static int dynamicPutbuf (struct gdIOCtx *ctx, const void *buf, int size) { dpIOCtx *dctx; dctx = (dpIOCtx *) ctx; appendDynamic (dctx->dp, buf, size); if (dctx->dp->dataGood) { return size; } else { return -1; }; } static void dynamicPutchar (struct gdIOCtx *ctx, int a) { unsigned char b; dpIOCtxPtr dctx; b = a; dctx = (dpIOCtxPtr) ctx; appendDynamic(dctx->dp, &b, 1); } static int dynamicGetbuf (gdIOCtxPtr ctx, void *buf, int len) { int rlen, remain; dpIOCtxPtr dctx; dynamicPtr *dp; dctx = (dpIOCtxPtr) ctx; dp = dctx->dp; remain = dp->logicalSize - dp->pos; if (remain >= len) { rlen = len; } else { if (remain <= 0) { return EOF; } rlen = remain; } memcpy(buf, (void *) ((char *) dp->data + dp->pos), rlen); dp->pos += rlen; return rlen; } static int dynamicGetchar (gdIOCtxPtr ctx) { unsigned char b; int rv; rv = dynamicGetbuf (ctx, &b, 1); if (rv != 1) { return EOF; } else { return b; /* (b & 0xff); */ } } /* ********************************************************************* * InitDynamic - Return a dynamically resizable void* * * ********************************************************************* */ static int allocDynamic (dynamicPtr * dp, int initialSize, void *data) { if (data == NULL) { dp->logicalSize = 0; dp->dataGood = FALSE; dp->data = gdMalloc(initialSize); } else { dp->logicalSize = initialSize; dp->dataGood = TRUE; dp->data = data; } dp->realSize = initialSize; dp->dataGood = TRUE; dp->pos = 0; return TRUE; } /* append bytes to the end of a dynamic pointer */ static int appendDynamic (dynamicPtr * dp, const void *src, int size) { int bytesNeeded; char *tmp; if (!dp->dataGood) { return FALSE; } /* bytesNeeded = dp->logicalSize + size; */ bytesNeeded = dp->pos + size; if (bytesNeeded > dp->realSize) { /* 2.0.21 */ if (!dp->freeOK) { return FALSE; } gdReallocDynamic(dp, bytesNeeded * 2); } /* if we get here, we can be sure that we have enough bytes to copy safely */ /*printf("Mem OK Size: %d, Pos: %d\n", dp->realSize, dp->pos); */ tmp = (char *) dp->data; memcpy((void *) (tmp + (dp->pos)), src, size); dp->pos += size; if (dp->pos > dp->logicalSize) { dp->logicalSize = dp->pos; } return TRUE; } /* grow (or shrink) dynamic pointer */ static int gdReallocDynamic (dynamicPtr * dp, int required) { void *newPtr; /* First try gdRealloc(). If that doesn't work, make a new memory block and copy. */ if ((newPtr = gdRealloc(dp->data, required))) { dp->realSize = required; dp->data = newPtr; return TRUE; } /* create a new pointer */ newPtr = gdMalloc(required); /* copy the old data into it */ memcpy(newPtr, dp->data, dp->logicalSize); gdFree(dp->data); dp->data = newPtr; dp->realSize = required; return TRUE; } /* trim pointer so that its real and logical sizes match */ static int trimDynamic (dynamicPtr * dp) { /* 2.0.21: we don't reallocate memory we don't own */ if (!dp->freeOK) { return FALSE; } return gdReallocDynamic(dp, dp->logicalSize); }