With this patch it is not possible to have
incorrect padding equal to 4.
---
sap/server.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sap/server.c b/sap/server.c
index 011faa6..c55aa6e 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -49,7 +49,7 @@
#define SAP_UUID "0000112D-0000-1000-8000-00805F9B34FB"
#define SAP_SERVER_CHANNEL 8
-#define PADDING4(x) (4 - (x & 0x03))
+#define PADDING4(x) ((4 - (x & 0x03)) & 0x03)
#define PARAMETER_SIZE(x) (sizeof(struct sap_parameter) + x + PADDING4(x))
#define SAP_NO_REQ 0xFF
--
on behalf of ST-Ericsson
Hi Lukasz,
On Tue, Jun 21, 2011, Lukasz Rymanowski wrote:
> With this patch it is not possible to have incorrect padding equal to 4.
> ---
> sap/server.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied. Thanks.
Johan