| 1 |
Author: Sergio Durigan Junior <[email protected]>, Jakub Wilk <[email protected]> |
| 2 |
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071316 |
| 3 |
Forwarded: no |
| 4 |
X-Not-Forwarded-Reason: upstream seems dead; repository has been archived |
| 5 |
|
| 6 |
Description: strlcat is present in glibc since version 2.38; there's |
| 7 |
no need to reimplement it anymore. |
| 8 |
|
| 9 |
Index: infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c |
| 10 |
=================================================================== |
| 11 |
--- infinipath-psm-3.3+20.604758e7.orig/ptl_ips/ips_proto_dump.c 2025-04-05 17:10:11.973708214 -0400 |
| 12 |
+++ infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c 2025-04-05 17:11:26.566038744 -0400 |
| 13 |
@@ -136,23 +136,6 @@ |
| 14 |
printf("mqhdr %x\n", p_hdr->mqhdr); |
| 15 |
} |
| 16 |
|
| 17 |
-// linux doesn't have strlcat; this is a stripped down implementation |
| 18 |
-// not super-efficient, but we use it rarely, and only for short strings |
| 19 |
-// not fully standards conforming! |
| 20 |
-static size_t strlcat(char *d, const char *s, size_t l) |
| 21 |
-{ |
| 22 |
- int dlen = strlen(d), slen, max; |
| 23 |
- if(l<=dlen) // bug |
| 24 |
- return l; |
| 25 |
- slen = strlen(s); |
| 26 |
- max = l-(dlen+1); |
| 27 |
- if(slen>max) |
| 28 |
- slen = max; |
| 29 |
- memcpy(d+dlen, s, slen); |
| 30 |
- d[dlen+slen] = '\0'; |
| 31 |
- return dlen+slen+1; // standard says to return full length, not actual |
| 32 |
-} |
| 33 |
- |
| 34 |
// decode RHF errors; only used one place now, may want more later |
| 35 |
void ips_proto_get_rhf_errstring(uint32_t err, char *msg, size_t len) |
| 36 |
{ |