[PATCH] fix crash in account_lookup when incoming user doesn't exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fugita,

The following patch fixes a bug I've just found in tgtd which causes it to crash when authenticating an incoming username that doesn't match any existing account.

I've had trouble subscribing to the list, so I'm mailing this directly to you, and cc-ing the list.

Regards,

Alex

Fix bug in account_lookup() that causes tgtd to crash when authenticating an
incoming username that doesn't match any existing account.

Signed-off-by: <alex.zeffertt@xxxxxxxxxxxxx>


--- a/usr/target.c	2009-05-20 10:35:50.000000000 -0400
+++ b/usr/target.c	2009-05-20 10:35:56.000000000 -0400
@@ -797,7 +797,7 @@
 		return -ENOENT;

 	if (type == ACCOUNT_TYPE_INCOMING) {
-		for (i = 0; target->account.nr_inaccount; i++) {
+		for (i = 0; i < target->account.nr_inaccount; i++) {
 			ac = __account_lookup_id(target->account.in_aids[i]);
 			if (ac) {
 				if (!strcmp(ac->user, user))
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux