Fix checking integer values by pointer 97/296197/1
authorArtur Świgoń <a.swigon@samsung.com>
Fri, 21 Jul 2023 11:26:26 +0000 (13:26 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 21 Jul 2023 11:48:55 +0000 (11:48 +0000)
Change-Id: Iece746f0cce647510791e31f5ca446f0266c6eb0

src/utils.c

index d69ccb9d720edd69ec3b605168a9ca613fbf7606..b6421d373a2fe7b3642d1881e095aa21a806cb39 100644 (file)
@@ -330,7 +330,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
                return EINA_FALSE;
        }
 
-       if (row < 0 || column < 0) {
+       if (*row < 0 || *column < 0) {
                ERROR("invalid cell position in table");
                g_object_unref(table_cell);
                return EINA_FALSE;
@@ -346,7 +346,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
        if (table_row_count && table_column_count && table_caption) {
                *table_row_count = atspi_table_get_n_rows(table, NULL);
 
-               if (table_row_count < 0) {
+               if (*table_row_count < 0) {
                        ERROR("invalid row count in table");
                        g_object_unref(table_cell);
                        g_object_unref(table);
@@ -355,7 +355,7 @@ Eina_Bool object_get_position_in_table(AtspiAccessible *object, int *row, int *c
 
                *table_column_count = atspi_table_get_n_columns(table, NULL);
 
-               if (table_column_count < 0) {
+               if (*table_column_count < 0) {
                        ERROR("invalid column count in table");
                        g_object_unref(table_cell);
                        g_object_unref(table);