Closed Timmmm closed 2 months ago
// Here we store calendar entries
int entriesNum = 0;
entry entries[128];
...
// Search raw data for events
while (i < n && strstr(data + i, "BEGIN:VEVENT"))
{
...
++entriesNum;
}
Come on guys. I shouldn't be able to find two school-boy buffer overflows on the very first example I try. This one took me an hour of tedious printf debugging thanks to Arduino's very slow build system.
The hardware is very nice (USB-C!!) but the software is decidedly Arduino-quality. :-/
@Timmmm
Thanks for pointing this out to us, the library is quite big and with all our other projects and products it's hard to keep it up to date with our small team :) We'll be pushing a quick fix for this soon.
-Rob
Hi @Timmmm ,
we've recently addressed this in a push to dev, which will be available in the main library once it's time for a new release. It was resolved by simply stopping to load more than 128 events, thanks to @koderchina who is interning here at Soldered :)
Thanks again for pointing it out to us!
Thanks! In the end I found that processing calendars is unfortunately quite complex due to repeated events, "floating" timezones (so it's always local time), the fact that the endpoint always sends every event, etc.
I decided to add a local server to do the heavy lifting in Rust and then just send an image to the Inkplate... and got sidetracked into designing a custom image format since there didn't seem to be anything particularly suitable.
I'll send you the code when I've got it working. :-)
Using the e-radionica Inkplate 10, latest Arduino 2.3.2, Inkplate 10.0.0, unmodified Google Calendar example, except to set the wifi details and calendar URL I get this:
This isn't going to be fun to debug. :-/ Looks like it is trying to load
0xfffffff4
and that is protected or unmapped. According to this tool to decode the backtrace which somewhat surprisingly actually worked, it is:Shapes.cpp:190
is