Hi,
The openhpi clien library is crashing on passing the wrong session id.
This problem is found while running the saftest suite for
openhpi-2.11.4.
The crash is happening at openhpid/oh_client_session.cpp at line number
208. Wrong session id from HPI user is not properly handled.
I've attached the patch for this problem.
Regards,
Raghavendra
diff -Naur openhpi-repo-orig/openhpid/oh_client_session.cpp openhpi-repo/openhpid/oh_client_session.cpp
--- openhpi-repo-orig/openhpid/oh_client_session.cpp 2008-07-16 14:40:20.000000000 +0530
+++ openhpi-repo/openhpid/oh_client_session.cpp 2008-07-16 14:47:00.000000000 +0530
@@ -199,16 +199,19 @@
connx);
dbg("We are inserting a new connection"
" in conns table");
+ *pinst = connx;
}
}
+ *dsid = client_session->dsid;
}
- *pinst = connx;
- *dsid = client_session->dsid;
g_static_rec_mutex_unlock(&sessions_sem);
- return SA_OK;
+ if (connx)
+ return SA_OK;
+ else
+ return SA_ERR_HPI_INVALID_SESSION;
}
static void __delete_connx(gpointer data)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel