summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ddbb49)
raw | patch | inline | side by side (parent: 8ddbb49)
author | Florian Forster <octo@verplant.org> | |
Fri, 3 Apr 2009 13:54:16 +0000 (15:54 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Fri, 3 Apr 2009 13:54:16 +0000 (15:54 +0200) |
Thanks to Tomasz Pala for pointing out the problem.
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index 579aba31daf41087195d9d523115ea1e662be3b9..0cff9f43a6422c0d563f59abf0eed2416928a3a5 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
@@ -342,8 +342,9 @@ static pinghost_t *ping_receive_ipv4 (pinghost_t *ph, char *buffer, size_t buffe
dprintf ("No match found for ident = 0x%04x, seq = %i\n",
ident, seq);
}
-
- ptr->recv_ttl = ip_hdr->ip_ttl;
+
+ if (ptr != NULL)
+ ptr->recv_ttl = ip_hdr->ip_ttl;
return (ptr);
}