🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by Bradley Head Fri, 24 Jul 1992 15:06
strlen() memory exception in Speaker/Listener - NeXT's doing
#222
Author: Bradley Head
Date: Fri, 24 Jul 1992 15:06
18 lines
1396 bytes

When I specify a parameter type of (char *) in  a msgwrap file, then 
proceed to use the speaker message passing a NULL pointer, the speaker 
sending mechanism produces an exception inside strlen(). Why didn't NeXT  
check for NULL prior to calling strlen(). Now I have to, and it makes the 
interface less than seamless. In University, when writing published
functions, I was taught to check input parameters (especially pointers) 
prior to using them.  strlen() doesn't check for a NULL string pointer  
before dereferencing it (which is why I wrote my own strlen()), neither  
does NeXT before using it inside Speaker/Listener. Now I have to throw in 
the check prior to the call. This wouldn't bother me so much if NeXT would 
DOCUMENT such a side affect.

...Brad
-- 
Bradley Head, bhead@hfs.questor.wimsey.bc.ca (NeXTmail :-)
InStep Mobile Communications Inc., Vancouver, BC CANADA
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads