ossp-pkg/sa/sa.c 1.38 -> 1.39
--- sa.c 2001/10/31 12:41:53 1.38
+++ sa.c 2001/10/31 20:42:42 1.39
@@ -614,6 +614,15 @@
if (saa == NULL || sabuf == NULL || salen == 0)
return SA_ERR_ARG;
+ /* make sure we import only supported addresses */
+ if (!( sabuf->sa_family == AF_LOCAL
+ || sabuf->sa_family == AF_INET
+#ifdef AF_INET6
+ || sabuf->sa_family == AF_INET6
+#endif
+ ))
+ return SA_ERR_USE;
+
/* create result address structure */
if (saa->saBuf != NULL)
free(saa->saBuf);
|
|