Xteink-X4-crosspoint-reader/lib
IFAKA cc86533e86
fix: add NULL check after malloc in readFileToMemory() (#81)
## Problem
`readFileToMemory()` allocates an output buffer via `malloc()` at line
120 but doesn't check if allocation succeeds. On low memory, the NULL
pointer is passed to `fread()` causing a crash.

## Fix
Add NULL check after `malloc()` for the output buffer. Follows the
existing pattern already used for `deflatedData` at line 141.

Changed `lib/ZipFile/ZipFile.cpp`.

## Test
- Follows existing validated pattern from same function
- Defensive addition only - no logic changes
2025-12-21 13:35:37 +11:00
..
EpdFont Fix font readability by expanding blacks and trimming whites (#55) 2025-12-18 21:39:13 +11:00
Epub Handle empty spine in getBookSize() and calculateProgress() (#67) 2025-12-19 23:28:36 +11:00
expat Add expat and swap out EPUB HTML parser (#2) 2025-12-06 20:57:24 +11:00
GfxRenderer fix: add NULL checks for frameBuffer in GfxRenderer (#79) 2025-12-21 13:34:58 +11:00
miniz Stream inflated EPUB HTMLs down to disk instead of inflating in memory (#4) 2025-12-08 00:39:17 +11:00
Serialization Public release 2025-12-03 22:06:45 +11:00
Utf8 Public release 2025-12-03 22:06:45 +11:00
ZipFile fix: add NULL check after malloc in readFileToMemory() (#81) 2025-12-21 13:35:37 +11:00
README Public release 2025-12-03 22:06:45 +11:00

This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into the executable file.

The source code of each library should be placed in a separate directory
("lib/your_library_name/[Code]").

For example, see the structure of the following example libraries `Foo` and `Bar`:

|--lib
|  |
|  |--Bar
|  |  |--docs
|  |  |--examples
|  |  |--src
|  |     |- Bar.c
|  |     |- Bar.h
|  |  |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
|  |
|  |--Foo
|  |  |- Foo.c
|  |  |- Foo.h
|  |
|  |- README --> THIS FILE
|
|- platformio.ini
|--src
   |- main.c

Example contents of `src/main.c` using Foo and Bar:
```
#include <Foo.h>
#include <Bar.h>

int main (void)
{
  ...
}

```

The PlatformIO Library Dependency Finder will find automatically dependent
libraries by scanning project source files.

More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html