⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
local
/
src
/
libavif-0.11.1
/
src
/
View File Name :
rawdata.c
// Copyright 2019 Joe Drago. All rights reserved. // SPDX-License-Identifier: BSD-2-Clause #include "avif/avif.h" #include <string.h> void avifRWDataRealloc(avifRWData * raw, size_t newSize) { if (raw->size != newSize) { uint8_t * old = raw->data; size_t oldSize = raw->size; raw->data = avifAlloc(newSize); raw->size = newSize; if (oldSize) { size_t bytesToCopy = (oldSize < raw->size) ? oldSize : raw->size; memcpy(raw->data, old, bytesToCopy); avifFree(old); } } } void avifRWDataSet(avifRWData * raw, const uint8_t * data, size_t len) { if (len) { avifRWDataRealloc(raw, len); memcpy(raw->data, data, len); } else { avifRWDataFree(raw); } } void avifRWDataFree(avifRWData * raw) { avifFree(raw->data); raw->data = NULL; raw->size = 0; }