isunbejo / sams2

Automatically exported from code.google.com/p/sams2
GNU General Public License v2.0
1 stars 0 forks source link

(Trac:430) Некорректное использование sprintf для копирования строк #423

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(Trac:430) Originaly reported by PavelVinogradov on 2010-01-12 19:21:54

Юрий Сбитнев:

В манах ясно написано (man sprintf):
{{{

Some programs imprudently rely on code such as the following

          sprintf(buf, "%s some further text", buf);

      to append text to buf.  However, the standards explicitly note that the results are undefined if source and destination buffers overlap when
      calling  sprintf(),  snprintf(),  vsprintf(),  and vsnprintf().  Depending on the version of gcc(1) used, and the compiler options employed,
      calls such as the above will not produce the expected results.
}}}

Original issue reported on code.google.com by bl...@nixdev.net on 5 Jun 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Commented by blaze@nixdev.net on 2010-08-26 22:24:23:

Прикладываю обновленную версию патча. Патч 
по прежнему нигде не тестировался, но 
теперь исправлена сборка проекта.

Original comment by bl...@nixdev.net on 5 Jun 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Commented by blaze@nixdev.net on 2010-09-01 18:05:51:

Есть подтверждение что патч решает 
проблему: 

Linux sgate 2.6.34-gentoo-r1 #1 SMP Wed Jul 21 19:49:58 MSD 2010 i686 Intel(R) 
Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

Original comment by bl...@nixdev.net on 5 Jun 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Commented by blaze@nixdev.net on 2010-09-08 22:05:19:

Fixed in [874]. WOW!!!

Original comment by bl...@nixdev.net on 5 Jun 2011 at 8:08