Fixed logging to support 8-charater identifiers
[tpg/acess2.git] / Kernel / messages.c
index 6fcd289..aaedf5c 100644 (file)
@@ -2,7 +2,7 @@
  * AcessOS Microkernel Version
  * messages.c
  */
-#include <common.h>
+#include <acess.h>
 #include <proc.h>
 #include <errno.h>
 
@@ -94,7 +94,15 @@ int Proc_GetMessage(Uint *Err, Uint *Source, void *Buffer)
        
        // Get message
        if(Buffer != GETMSG_IGNORE)
+       {
+               if( !CheckMem( Buffer, cur->Messages->Length ) )
+               {
+                       *Err = -EINVAL;
+                       RELEASE( &cur->IsLocked );
+                       return -1;
+               }
                memcpy(Buffer, cur->Messages->Data, cur->Messages->Length);
+       }
        ret = cur->Messages->Length;
        
        // Remove from list

UCC git Repository :: git.ucc.asn.au