Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fa05849e
Commit
fa05849e
authored
Feb 11, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translated sprintf calls into snprintf.
parent
073abfce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
ext_debugger.c
programs/winedbg/ext_debugger.c
+1
-1
hash.c
programs/winedbg/hash.c
+7
-7
module.c
programs/winedbg/module.c
+2
-2
source.c
programs/winedbg/source.c
+1
-1
No files found.
programs/winedbg/ext_debugger.c
View file @
fa05849e
...
...
@@ -129,7 +129,7 @@ void DEBUG_ExternalDebugger(void)
memset
(
pid_string
,
0
,
DBG_BUFF_SIZE
);
/* make pid into string */
s
printf
(
pid_string
,
"%ld"
,
(
long
)
attach_pid
);
s
nprintf
(
pid_string
,
sizeof
(
pid_string
)
,
"%ld"
,
(
long
)
attach_pid
);
/* now exec the debugger to get it's own clean memory space */
if
(
dbg_no_xterm
)
...
...
programs/winedbg/hash.c
View file @
fa05849e
...
...
@@ -721,7 +721,7 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
strcat
(
arglist
,
", "
);
}
DEBUG_READ_MEM_VERBOSE
(
ptr
,
&
val
,
sizeof
(
val
));
s
printf
(
argtmp
,
"%s=0x%x"
,
nearest
->
local_vars
[
i
].
name
,
val
);
s
nprintf
(
argtmp
,
sizeof
(
argtmp
)
,
"%s=0x%x"
,
nearest
->
local_vars
[
i
].
name
,
val
);
strcat
(
arglist
,
argtmp
);
}
...
...
@@ -736,7 +736,7 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
char
*
ptr
=
strrchr
(
module
->
module_name
,
'/'
);
if
(
!
ptr
++
)
ptr
=
module
->
module_name
;
s
printf
(
modbuf
,
" in %s"
,
ptr
);
s
nprintf
(
modbuf
,
sizeof
(
modbuf
)
,
" in %s"
,
ptr
);
}
else
modbuf
[
0
]
=
'\0'
;
...
...
@@ -765,7 +765,7 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
if
(
lineno
!=
-
1
)
{
s
printf
(
linebuff
,
":%d"
,
lineno
);
s
nprintf
(
linebuff
,
sizeof
(
linebuff
)
,
":%d"
,
lineno
);
lineinfo
=
linebuff
;
if
(
source
!=
NULL
)
{
...
...
@@ -779,22 +779,22 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
else
sourcefile
++
;
if
(
addr
->
off
==
nearest
->
value
.
addr
.
off
)
s
printf
(
name_buffer
,
"%s%s [%s%s]%s"
,
nearest
->
name
,
s
nprintf
(
name_buffer
,
sizeof
(
name_buffer
)
,
"%s%s [%s%s]%s"
,
nearest
->
name
,
arglist
,
sourcefile
,
lineinfo
,
modbuf
);
else
s
printf
(
name_buffer
,
"%s+0x%lx%s [%s%s]%s"
,
nearest
->
name
,
s
nprintf
(
name_buffer
,
sizeof
(
name_buffer
)
,
"%s+0x%lx%s [%s%s]%s"
,
nearest
->
name
,
addr
->
off
-
nearest
->
value
.
addr
.
off
,
arglist
,
sourcefile
,
lineinfo
,
modbuf
);
}
else
{
if
(
addr
->
off
==
nearest
->
value
.
addr
.
off
)
s
printf
(
name_buffer
,
"%s%s%s"
,
nearest
->
name
,
arglist
,
modbuf
);
s
nprintf
(
name_buffer
,
sizeof
(
name_buffer
)
,
"%s%s%s"
,
nearest
->
name
,
arglist
,
modbuf
);
else
{
if
(
addr
->
seg
&&
(
nearest
->
value
.
addr
.
seg
!=
addr
->
seg
))
return
NULL
;
else
s
printf
(
name_buffer
,
"%s+0x%lx%s%s"
,
nearest
->
name
,
s
nprintf
(
name_buffer
,
sizeof
(
name_buffer
)
,
"%s+0x%lx%s%s"
,
nearest
->
name
,
addr
->
off
-
nearest
->
value
.
addr
.
off
,
arglist
,
modbuf
);
}
}
...
...
programs/winedbg/module.c
View file @
fa05849e
...
...
@@ -246,7 +246,7 @@ static void DEBUG_LoadModule16(HMODULE hModule, NE_MODULE* module, char* moduleA
cpnt += 1 + buf[0] + sizeof(WORD);
while (DEBUG_READ_MEM_VERBOSE(cpnt, buf, sizeof(buf)) && buf[0]) {
s
printf(epname
, "%s.%.*s", name, buf[0], &buf[1]);
s
nprintf(epname, sizeof(epname)
, "%s.%.*s", name, buf[0], &buf[1]);
if (DEBUG_GetEP16(moduleAddr, module, *(WORD*)&buf[1 + buf[0]], &value.addr)) {
DEBUG_AddSymbol(epname, &value, NULL, SYM_WIN32 | SYM_FUNC);
}
...
...
@@ -257,7 +257,7 @@ static void DEBUG_LoadModule16(HMODULE hModule, NE_MODULE* module, char* moduleA
if (!module->nrname_handle) return; /* No non-resident table */
cpnt = (char *)GlobalLock16(module->nrname_handle);
while (DEBUG_READ_MEM_VERBOSE(cpnt, buf, sizeof(buf)) && buf[0]) {
s
printf(epname
, "%s.%.*s", name, buf[0], &buf[1]);
s
nprintf(epname, sizeof(epname)
, "%s.%.*s", name, buf[0], &buf[1]);
if (DEBUG_GetEP16(moduleAddr, module, *(WORD*)&buf[1 + buf[0]], &value.addr)) {
DEBUG_AddSymbol(epname, &value, NULL, SYM_WIN32 | SYM_FUNC);
}
...
...
programs/winedbg/source.c
View file @
fa05849e
...
...
@@ -215,7 +215,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
/*
* Still couldn't find it. Ask user for path to add.
*/
s
printf
(
zbuf
,
"Enter path to file '%s': "
,
sourcefile
);
s
nprintf
(
zbuf
,
sizeof
(
zbuf
)
,
"Enter path to file '%s': "
,
sourcefile
);
DEBUG_ReadLine
(
zbuf
,
tmppath
,
sizeof
(
tmppath
));
if
(
tmppath
[
strlen
(
tmppath
)
-
1
]
!=
'/'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment