Files
linamh/net-fs/ncpfs/files/ncpfs-2.2.6-r5-nds-null-name.patch
2026-04-20 09:42:39 +02:00

46 lines
832 B
Diff

--- a/lib/nwnet.c
+++ b/lib/nwnet.c
@@ -212,6 +212,15 @@
char *o;
size_t ol;
int ret;
+
+ if (inp == NULL || inl == NULL || outp == NULL || outl == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (*inp == NULL || *outp == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
ret = 0;
ol = *outl;
@@ -324,6 +333,15 @@
char *o;
size_t ol;
int ret;
+
+ if (inp == NULL || inl == NULL || outp == NULL || outl == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (*inp == NULL || *outp == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
ret = 0;
ol = *outl;
@@ -2303,6 +2321,10 @@
static inline NWDSCCODE NWDSPutAttrVal_DIST_NAME(NWDSContextHandle ctx, Buf_T* buffer,
const NWDSChar* name) {
+ if (name == NULL) {
+ errno = EINVAL;
+ return ERR_NULL_POINTER;
+ }
return NWDSCtxBufDN(ctx, buffer, name);
}