Changeset View
Changeset View
Standalone View
Standalone View
files/patch-source3_lib_adouble.c
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- source3/lib/adouble.c.orig 2020-01-31 11:25:36.000000000 +0100 | |||||
+++ source3/lib/adouble.c 2020-09-19 20:14:34.979937000 +0200 | |||||
@@ -2662,6 +2662,8 @@ | |||||
return AFP_INFO_SIZE; | |||||
} | |||||
+#define BROKEN_FREEBSD_AFP_Signature 0x00465000 | |||||
+ | |||||
/** | |||||
* Unpack a buffer into a AfpInfo structure | |||||
* | |||||
@@ -2681,10 +2683,20 @@ | |||||
memcpy(ai->afpi_FinderInfo, (const char *)data + 16, | |||||
sizeof(ai->afpi_FinderInfo)); | |||||
- if (ai->afpi_Signature != AFP_Signature | |||||
- || ai->afpi_Version != AFP_Version) { | |||||
- DEBUG(1, ("Bad AfpInfo signature or version\n")); | |||||
+ if (ai->afpi_Signature != AFP_Signature) { | |||||
+ DBG_WARNING("Bad AFP signature [%x]\n", ai->afpi_Signature); | |||||
+ | |||||
+ if (ai->afpi_Signature != BROKEN_FREEBSD_AFP_Signature) { | |||||
+ DBG_ERR("Bad AfpInfo signature\n"); | |||||
+ TALLOC_FREE(ai); | |||||
+ return NULL; | |||||
+ } | |||||
+ } | |||||
+ | |||||
+ if (ai->afpi_Version != AFP_Version) { | |||||
+ DBG_ERR("Bad AfpInfo version\n"); | |||||
TALLOC_FREE(ai); | |||||
+ return NULL; | |||||
} | |||||
return ai; |