Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:No - there are plenty of safer alternatives (Score 1) 486

Mod parent up!

So very many programmers tend to forget that strncpy DOES NOT ALWAYS NULL TERMINATE!

The only time it does is when the source data is shorter than the destination buffer. If the source string is longer than the destination buffer however, then the end result is the string is NOT null terminated, thereby leading to Bad Things(tm) happening whenever some other code does a strlen on the result (or worse, uses the return value from strlen(result) to determine how much data needs to be memcpy'ed somewhere).

strncpy is bad.

Use strlcpy (BSD) or MS's strcpy_s instead.

Comment "Legal issues" (Score 1) 274

"But there are "legal issues" that need to be resolved before this "telephonic neighbourhood watch" can be put into action, said a spokesman for the company."

Yeah, like maybe admitting that your new "invention" that "basically intercepts all calls" has already been invented by someone else here in the states. Someone called Verizon. They've been offering their "Call Intercept" calling feature for quite a few years now:

CALL INTERCEPT

Screen calls - even from anonymous callers.

Call Intercept screens unidentified calls and lets you handle them however you like. Fewer unwanted calls means more peace and quiet for you at home.

How Call Intercept Works

    * This automated service works with Caller ID service.

    * Unidentified callers that typically show up as "Anonymous," "Out of Area," "Private" or "Unavailable" on your Caller ID display are prompted to record their identity before your phone rings.*

    * Once the caller records his or her identity, the service alerts you with a unique ring and displays "Call Intercept" on your Caller ID unit.

    * When you pick up the phone, Call Intercept plays the recording and then gives you several options for handling the call.

Additional Benefits

    * Unidentified callers who don't record their name hear a pre-recorded message stating that you do not accept unidentified calls, and then are disconnected.

    * Use of a four-digit Personal Identification Number (PIN) that you choose allows friends and family to bypass the screening process. When Call Intercept is bypassed using the PIN, you hear a unique ring and "Priority Call" appears on the Caller ID display.

    * If no one answers, Call Intercept will allow the caller to leave a message on your answering machine or Home Voice Mail service.

    * You have the ability to change your four-digit Personal Identification Number (PIN) and to turn Call Intercept on and off. Simply dial 1 800 527 7070 and follow the voice prompts.

Source:

    http://tinyurl.com/5qprsu (web page)

or:

    http://tinyurl.com/5qprsu (PDF)

Slashdot Top Deals

Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. -- Ambrose Bierce

Working...