diff --git a/plugins/sql.c b/plugins/sql.c index 7c0f91645..e4e61db39 100644 --- a/plugins/sql.c +++ b/plugins/sql.c @@ -880,7 +880,7 @@ static bool extract_node_id(int gosstore_fd, size_t off, u16 type, != sizeof(flen)) return false; - node_id_off = off + feature_len_off + 2 + flen + 4; + node_id_off = off + feature_len_off + 2 + be16_to_cpu(flen) + 4; if (pread(gosstore_fd, id, sizeof(*id), node_id_off) != sizeof(*id)) return false;