Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b22ac726 authored by Satya Krishna Pindiproli's avatar Satya Krishna Pindiproli
Browse files

hal: replace strcat with strlcat

Replace all occurrences of strcat with the safer version strlcat
to fix KW issues reported due to usage of banned functions.

CRs-Fixed: 2123221
Change-Id: I2e598c112d4ff79b3a4e82717549c1b051a80a41
parent 484e8d2a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3601,9 +3601,9 @@ static bool stream_get_parameter_channels(struct str_parms *query,
            for (j = 0; j < ARRAY_SIZE(channels_name_to_enum_table); j++) {
                if (channels_name_to_enum_table[j].value == supported_channel_masks[i]) {
                    if (!first)
                        strcat(value, "|");
                        strlcat(value, "|", sizeof(value));

                    strcat(value, channels_name_to_enum_table[j].name);
                    strlcat(value, channels_name_to_enum_table[j].name, sizeof(value));
                    first = false;
                    break;
                }
@@ -3631,9 +3631,9 @@ static bool stream_get_parameter_formats(struct str_parms *query,
            for (j = 0; j < ARRAY_SIZE(formats_name_to_enum_table); j++) {
                if (formats_name_to_enum_table[j].value == supported_formats[i]) {
                    if (!first) {
                        strcat(value, "|");
                        strlcat(value, "|", sizeof(value));
                    }
                    strcat(value, formats_name_to_enum_table[j].name);
                    strlcat(value, formats_name_to_enum_table[j].name, sizeof(value));
                    first = false;
                    break;
                }