owntracks / recorder

Store and access data published by OwnTracks apps
Other
910 stars 123 forks source link

Suspicious strncpy usage when geohashing #368

Closed a-andreyev closed 3 years ago

a-andreyev commented 3 years ago

Hello and thank you for the project!

With GCC 11 I'm getting this compilation error (trying git version in Arch Linux):

In function ‘strncat’,
    inlined from ‘get_neighbor’ at geohash.c:110:5:
/usr/include/bits/string_fortified.h:135:10: error: ‘__builtin___strncat_chk’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]

Here's the mentioned line: https://github.com/owntracks/recorder/blob/a3a518a24da6abf1cf2d28bc9197536ff213f8f1/geohash.c#L110

Didn't managed to handle it yet, going to contribute if will find the solution (not familiar with the code yet).

jpmens commented 3 years ago

Fixed and closed via #369