6c23d5c551
Resolves RHEL-5636
16 lines
377 B
Diff
16 lines
377 B
Diff
--- a/db.c 2024-01-03 10:36:30.009600848 +0100
|
|
+++ b/db.c 2024-02-21 11:35:04.420115207 +0100
|
|
@@ -283,8 +283,10 @@
|
|
BCOPY(e, ep->e, 6);
|
|
if (h == NULL && !initializing)
|
|
h = getsname(a);
|
|
- if (h != NULL && !isdigit((int)*h))
|
|
- strcpy(ep->h, h);
|
|
+ if (h != NULL) {
|
|
+ strncpy(ep->h, h, sizeof(ep->h));
|
|
+ ep->h[sizeof(ep->h) - 1] = '\0';
|
|
+ }
|
|
ep->t = t;
|
|
return (ep);
|
|
}
|