Patch says it all.
Regards,
Honza
diff --git a/trunk/lib/msg.c b/trunk/lib/msg.c
index a631085..90473f2 100644
--- a/trunk/lib/msg.c
+++ b/trunk/lib/msg.c
@@ -380,6 +380,11 @@ saMsgQueueOpen (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueOpen\n");
+ if (queueName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -483,6 +488,11 @@ saMsgQueueOpenAsync (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueOpenAsync\n");
+ if (queueName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -637,6 +647,11 @@ saMsgQueueStatusGet (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueStatusGet\n");
+ if (queueName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -748,6 +763,11 @@ saMsgQueueUnlink (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueUnlink\n");
+ if (queueName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -799,6 +819,11 @@ saMsgQueueGroupCreate (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueGroupCreate\n");
+ if (queueGroupName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -852,6 +877,11 @@ saMsgQueueGroupInsert (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueGroupInsert\n");
+ if (queueName == NULL || queueGroupName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -905,6 +935,11 @@ saMsgQueueGroupRemove (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueGroupRemove\n");
+ if (queueName == NULL || queueGroupName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -957,6 +992,11 @@ saMsgQueueGroupDelete (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueGroupDelete\n");
+ if (queueGroupName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa(hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -1113,6 +1153,11 @@ saMsgQueueGroupTrackStop (
/* DEBUG */
printf ("[DEBUG]: saMsgQueueGroupTrackStop\n");
+ if (queueGroupName == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
@@ -1552,6 +1597,11 @@ saMsgMessageSendReceive (
/* DEBUG */
printf ("[DEBUG]: saMsgMessageSendReceive\n");
+ if (destination == NULL || sendMessage == NULL) {
+ error = SA_AIS_ERR_INVALID_PARAM;
+ goto error_exit;
+ }
+
error = hdb_error_to_sa (hdb_handle_get (&msgHandleDatabase,
msgHandle, (void *)&msgInstance));
if (error != SA_AIS_OK) {
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais