oops ... I attached the wrong patch.
Here is the correct patch for the crash problem.
Regards,
Raghavendra
On Wed, 2008-07-16 at 14:53 +0530, Raghavendra PG wrote:
> 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 15:03:23.000000000 +0530
+++ openhpi-repo/openhpid/oh_client_session.cpp 2008-07-16 15:03:25.000000000 +0530
@@ -201,14 +201,17 @@
" in conns table");
}
}
+ *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