The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


"chat"


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Tue, 20 Oct 1998 18:44:46 +0100 (BST)
From: (Alan Cox) <alan@lxorguk.ukuu.org.uk>
To: (Chuck W.) <poke@oly.silverlink.net>
Subject: Re: "chat"
Cc: security-audit@ferret.lmh.ox.ac.uk

> Just curious, is there an official programming standard that, when
> followed strictly, has a tendency to create programs that are free of
> overflow programs?

There is no single method I've seen. qmail has its own distinct set of
string operations.

The general rules I would suggest are

1.	Always pass the length of a buffer into a function. If the length
	is guaranteed to be a given size then document it and use a #define
	so the size always does match

2.	Use snprintf and friends aggressively. If you don't use a function
	that doesn't take length limits you will be a lot safer

3.	Except where there are performance issues or the size situation
	is obvious then dynamically allocate objects. 

Alan

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>

АКЦИЯ! ПОДПИШИСЬ на журнал Linux Format до 31 января 2012 года и выиграй СУПЕРПРИЗ!

Журнал "Linux Format" (Линукс Формат)- Единственный в России и странах СНГ журнал на русском языке, посвящённый Linux и свободному ПО. Журнал для IT-директоров, IT-менеджеров, программистов, системных администраторов, учителей школ и преподавателей ВУЗов и всех пользователей ПК. В каждом выпуске: Новости индустрии OpenSource, обзоры новинок свободного ПО, обучающие и методические статьи.

Каждый, кто оформит подписку, получает бонус- объёмные наклейки на системный блок и подарки: с одним из первых выпусков журнала в 2012 году- диск с архивом номеров за 2005-2011 г.г. и ежемесячно электронную версию журнала в pdf-формате.

Подробнее о проведении акции вы можете прочитать на странице сайта.


  Закладки на сайте
  Проследить за страницей
Created 1996-2012 by Maxim Chirkov  
ДобавитьРекламаВебмастеруГИД  
RUNNet TopList