Skip to contentSkip to conversation

: Fix NULL-ptr dereference in irlmp_get_saddr()

PATCH Applied Patrick McHardy 3 participants 3 messages May 28, 2004 – May 29, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix NULL-ptr dereference in irlmp_get_saddr()

This patch fixes a NULL-ptr dereference in irlmp_get_saddr.

Regards
Patrick

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/05/28 12:32:37+02:00 [email protected]
# [IRDA]: Fix NULL-ptr dereference in irlmp_get_saddr()
#

# include/net/irda/irlmp.h
#   2004/05/28 12:32:30+02:00 [email protected] +1 -1
#   [IRDA]: Fix NULL-ptr dereference in irlmp_get_saddr()
# 
diff -Nru a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
--- a/include/net/irda/irlmp.h	2004-05-28 12:35:56 +02:00
+++ b/include/net/irda/irlmp.h	2004-05-28 12:35:56 +02:00
@@ -251,7 +251,7 @@

static inline __u32 irlmp_get_saddr(const struct lsap_cb *self) {
- return (self && !self->lap) ? self->lap->saddr : 0;
+ return (self && self->lap) ? self->lap->saddr : 0;
}

static inline __u32 irlmp_get_daddr(const struct lsap_cb *self)

#1 lore raw
Quoted 4 lines · Patrick McHardy

This patch fixes a NULL-ptr dereference in irlmp_get_saddr.

Regards
Patrick

Wow ! This one is scary !
Thanks

Jean