ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] не собирается toppler. Прошу помощи.
@ 2009-08-06  6:19 "Шишков Е.В."
  2009-08-06  6:37 ` Alexey Tourbin
  0 siblings, 1 reply; 3+ messages in thread
From: "Шишков Е.В." @ 2009-08-06  6:19 UTC (permalink / raw)
  To: devel

Всем привет.

Был в отпуске. Пока отдыхал, перестал пакетик мой собираться (toppler).
Попытался починить - не получается.

leveledit.o leveledit.cc
leveledit.cc: In function 'void le_edit()':
leveledit.cc:519: warning: deprecated conversion from string constant to 'char*'
In file included from /usr/include/stdio.h:912,
                  from decl.h:24,
                  from leveledit.cc:21:
In function 'int snprintf(char*, size_t, const char*, ...)',
     inlined from 'void le_showkeyhelp(int, int)' at leveledit.cc:439,
     inlined from 'void le_edit()' at leveledit.cc:935:
/usr/include/bits/stdio2.h:66: error: call to int __builtin___snprintf_chk(char*, unsigned 
int, int, unsigned int, const char*, ...) will always overflow destination buffer
make[2]: Leaving directory `/usr/src/RPM/BUILD/toppler-1.1.3'
make[2]: *** [leveledit.o] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/toppler-1.1.3'
make: Leaving directory `/usr/src/RPM/BUILD/toppler-1.1.3'

RPM build errors:
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Прошу помочь в починке.

-- 
С уважением,
Шишков Евгений



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] не собирается toppler. Прошу помощи.
  2009-08-06  6:19 [devel] не собирается toppler. Прошу помощи "Шишков Е.В."
@ 2009-08-06  6:37 ` Alexey Tourbin
  2009-08-06  7:39   ` "Шишков Е.В."
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Tourbin @ 2009-08-06  6:37 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]

On Thu, Aug 06, 2009 at 10:19:44AM +0400, "Шишков Е.В." wrote:
> Всем привет.
> 
> Был в отпуске. Пока отдыхал, перестал 
> пакетик мой собираться (toppler).
> Попытался починить - не получается.
> 
> leveledit.o leveledit.cc
> leveledit.cc: In function 'void le_edit()':
> leveledit.cc:519: warning: deprecated conversion from string constant to 
> 'char*'
> In file included from /usr/include/stdio.h:912,
>                  from decl.h:24,
>                  from leveledit.cc:21:
> In function 'int snprintf(char*, size_t, const char*, ...)',
>     inlined from 'void le_showkeyhelp(int, int)' at leveledit.cc:439,
>     inlined from 'void le_edit()' at leveledit.cc:935:
> /usr/include/bits/stdio2.h:66: error: call to int 
> __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const 
> char*, ...) will always overflow destination buffer

leveledit.cc:
   411  static void le_showkeyhelp(int row, int col) {
   412    int k;
   413    int maxkeylen = 0;
   414    textsystem *ts = new textsystem(_("Editor Key Help"), editor_background_menu_proc);
   415    char tabbuf1[6], tabbuf2[6];
   416      
   417    if (!ts) return;
   418  
   419    for (k = 0; k < SIZE(_ed_keys); k++) {
   420        char knam[256];
   421        snprintf(knam, 256, "%s%s", keymod2str(_ed_keys[k].mod), SDL_GetKeyName(_ed_keys[k].key));
   422        int l = scr_textlength(knam);
   423        
   424        if (l > maxkeylen) maxkeylen = l;
   425    }
   426  
   427    snprintf(tabbuf1, 6, "%3i", maxkeylen + FONTWID);
   428    if (tabbuf1[0] < '0') tabbuf1[0] = '0';
   429    if (tabbuf1[1] < '0') tabbuf1[1] = '0';
   430    if (tabbuf1[2] < '0') tabbuf1[2] = '0';
   431      
   432    for (k = 0; k < SIZE(_ed_keys); k++) {
   433        char buf[256];
   434        char tmpb[256];
   435        char knam[256];
   436  
   437        snprintf(knam, 256, "%s%s", keymod2str(_ed_keys[k].mod), SDL_GetKeyName(_ed_keys[k].key));
   438        
   439        snprintf(tabbuf2, 256, "%3i", maxkeylen - scr_textlength(knam));
   440        if (tabbuf2[0] < '0') tabbuf2[0] = '0';
   441        if (tabbuf2[1] < '0') tabbuf2[1] = '0';
   442        if (tabbuf2[2] < '0') tabbuf2[2] = '0';

В строке 439 у sprintf неправильный аргумент "размер буфера":
буфер объявлен как tabbuf2[6] (строка 415), а печатают в него
как будто он 256 байтов.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] не собирается toppler. Прошу помощи.
  2009-08-06  6:37 ` Alexey Tourbin
@ 2009-08-06  7:39   ` "Шишков Е.В."
  0 siblings, 0 replies; 3+ messages in thread
From: "Шишков Е.В." @ 2009-08-06  7:39 UTC (permalink / raw)
  To: ALT Linux Team development discussions

06.08.2009 10:37, Alexey Tourbin пишет:

>     415    char tabbuf1[6], tabbuf2[6];

>     439        snprintf(tabbuf2, 256, "%3i", maxkeylen - scr_textlength(knam));

> В строке 439 у sprintf неправильный аргумент "размер буфера":
> буфер объявлен как tabbuf2[6] (строка 415), а печатают в него
> как будто он 256 байтов.
>

О! Понял. Буду ковырять.
Благодарю.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-06  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-06  6:19 [devel] не собирается toppler. Прошу помощи "Шишков Е.В."
2009-08-06  6:37 ` Alexey Tourbin
2009-08-06  7:39   ` "Шишков Е.В."

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git