The Samba-Bugzilla – Attachment 9080 Details for
Bug 10033
call to mmap() not checked for failure in shared_mmap.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Corrects file for README.Coding standard
snprintf.c.patch (text/plain), 1.28 KB, created by
Bill Parker
on 2013-07-26 19:57:59 UTC
(
hide
)
Description:
Corrects file for README.Coding standard
Filename:
MIME Type:
Creator:
Bill Parker
Created:
2013-07-26 19:57:59 UTC
Size:
1.28 KB
patch
obsolete
>--- snprintf.c.orig 2013-07-24 18:30:38.223553569 -0700 >+++ snprintf.c 2013-07-24 18:33:04.953548599 -0700 >@@ -9,21 +9,39 @@ > va_start(ap, format); > len = vsnprintf(buf, 0, format, ap); > va_end(ap); >- if (len != 5) exit(1); >+ if (len != 5) { >+ exit(1); >+ } > > va_start(ap, format); > len = vsnprintf(0, 0, format, ap); > va_end(ap); >- if (len != 5) exit(2); >+ if (len != 5) { >+ exit(2); >+ } > >- if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3); >+ if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) { >+ exit(3); >+ } > >- if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4); >- if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5); >- if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6); >- if (snprintf(buf, 20, "%s", 0) < 3) exit(7); >+ if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) { >+ exit(4); >+ } >+ if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) { >+ exit(5); >+ } >+ if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) { >+ exit(6); >+ } >+ if (snprintf(buf, 20, "%s", 0) < 3) { >+ exit(7); >+ } > > printf("1"); > exit(0); > } >-main() { foo("hello"); } >+ >+int main() >+{ >+ foo("hello"); >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
wp02855
:
review?
Actions:
View
Attachments on
bug 10033
:
9058
|
9077
|
9078
|
9079
| 9080 |
9081