Thread: My shmem utils
View Single Post
Old 09-29-2003, 04:44 PM  
vod
Member
 
Join Date: Jun 2002
Posts: 84
Default

Quote:
Originally posted by Mouton
little thing u might wanna add to your getOnlineUser() function:

sometimes, the userid in the returned LPDC_ONLINEDATA structure is -1... that happens when the user is login in. you should return false then, or io will crash when u'll try to convert that invalid uid to a username later on...

was crashing ioftpd with that in ioBMonitor.
weird, seems like it should not send back info with uid = -1, ill add a check for it, tho
i forget how it looks in the version i posted, but the updated one i have calls uidToName which takes unsigned int, then it mods it with 1024*1024-1 which prevents crashing io
of course, -1 will actually give info back if a user with id 4095 exists...which is not what is wanted

even though i really think that is should be impossiable to crash io via shmem...common for bounds checking dark!
vod is offline