laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/42000?usp=email )


Change subject: dahdi-base: Use strncpy instead of strncat for beginning of 
buffer
......................................................................

dahdi-base: Use strncpy instead of strncat for beginning of buffer

This fixes a build failure I observe with kernel v6.2:

                 from dahdi-linux/drivers/dahdi/dahdi-base.c:40:
./include/linux/fortify-string.h:388:32: note: expected ‘char *’ but argument 
is of type ‘long unsigned int’
  388 | char *strncat(char * const POS p, const char * const POS q, 
__kernel_size_t count)
      |               ~~~~~~~~~~~~~~~~~^
make[2]: *** [scripts/Makefile.build:252: 
dahdi-linux/drivers/dahdi/dahdi-base.o] Error 1

Change-Id: I539167b46f265d3c8e6dc52c978f39d58c37405f
---
M drivers/dahdi/dahdi-base.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/00/42000/1

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 6411e52..a0238e6 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -5449,7 +5449,7 @@
                         */
                         continue;
                }
-               strncat(vi.echo_canceller, ec_name, space);
+               strncpy(vi.echo_canceller, ec_name, space);
                space -= strlen(ec_name);
                if (space < 1)
                        break;

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/42000?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I539167b46f265d3c8e6dc52c978f39d58c37405f
Gerrit-Change-Number: 42000
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>

Reply via email to