public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Fix null dereference in src/main.c
@ 2009-04-01  2:30 Gustavo F. Padovan
  2009-04-01  2:30 ` [PATCH 2/3] Fix null dereference in gdbus/watch.c Gustavo F. Padovan
  2009-04-01  5:52 ` [PATCH 1/3] Fix null dereference in src/main.c Johan Hedberg
  0 siblings, 2 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2009-04-01  2:30 UTC (permalink / raw)
  To: linux-bluetooth

str could be null when dst isn't null
---
 src/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main.c b/src/main.c
index 2d24d07..3ad9048 100644
--- a/src/main.c
+++ b/src/main.c
@@ -266,7 +266,7 @@ static char *expand_name(char *dst, int size, char *str, int dev_id)
 	register int sp, np, olen;
 	char *opt, buf[10];
 
-	if (!str && !dst)
+	if (!str || !dst)
 		return NULL;
 
 	sp = np = 0;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-01  5:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01  2:30 [PATCH 1/3] Fix null dereference in src/main.c Gustavo F. Padovan
2009-04-01  2:30 ` [PATCH 2/3] Fix null dereference in gdbus/watch.c Gustavo F. Padovan
2009-04-01  2:30   ` [PATCH 3/3] Fix memset of sco_opt Gustavo F. Padovan
2009-04-01  5:56     ` Johan Hedberg
2009-04-01  5:54   ` [PATCH 2/3] Fix null dereference in gdbus/watch.c Johan Hedberg
2009-04-01  5:52 ` [PATCH 1/3] Fix null dereference in src/main.c Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox