spa: deal with non-null terminated strings in spa_error_location

Add len field to indicate number of valid characters after location.
This commit is contained in:
Pauli Virtanen 2024-03-27 18:30:13 +02:00
parent a0af514581
commit 3e99a0e839
3 changed files with 3 additions and 1 deletions

View file

@ -330,6 +330,7 @@ static inline bool spa_ptr_inside_and_aligned(const void *p1, size_t s1,
struct spa_error_location {
int line;
int col;
size_t len;
const char *location;
const char *reason;
};