Xteink-X4-crosspoint-reader/lib
IFAKA c1d5f5d562
Add NULL checks after fopen() in ZipFile (#68)
## Problem
Three `fopen()` calls in ZipFile.cpp did not check for NULL before using
the file handle. If files cannot be opened, `fseek`/`fread`/`fclose`
receive NULL and crash.

## Fix
Added NULL checks with appropriate error logging and early returns for
all three locations:
- `getDataOffset()`
- `readFileToMemory()`
- `readFileToStream()`

## Testing
- Builds successfully with `pio run`
- Affects: `lib/ZipFile/ZipFile.cpp`
2025-12-19 23:28:43 +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 Custom sleep screen support with BMP reading (#57) 2025-12-19 08:45:14 +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 Add NULL checks after fopen() in ZipFile (#68) 2025-12-19 23:28:43 +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