Home
last modified time | relevance | path

Searched +full:safer +full:- +full:buffer (Results 1 – 25 of 197) sorted by relevance

12345678

/external/clang/test/Analysis/
Dcstring-syntax.c1-analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -Wno-strncat-size -Wno-s…
9 …AA", sizeof(dest) - 1); // expected-warning {{Potential buffer overflow. Replace with 'sizeof(dest… in testStrncat()
10 …dest, "AAAAAAAAAAAAAAAAAAAAAAAAAAA", sizeof(dest)); // expected-warning {{Potential buffer overflo… in testStrncat()
11 … "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", sizeof(dest) - strlen(dest)); // expected-warning {{Potential in testStrncat()
12 strncat(dest, src, sizeof(src)); // expected-warning {{Potential buffer overflow. Replace with}} in testStrncat()
/external/cldr/tools/st-prom-exporter/
Dpackage-lock.json2 "name": "@unicode-org/st-prom-exporter",
9 "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
10 …"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwa…
12 "mime-types": "~2.1.34",
16 "array-flatten": {
18 "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
19 …"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmh…
23 "resolved": "https://registry.npmjs.org/bent/-/bent-7.3.10.tgz",
24 …"integrity": "sha512-X2P2nGRWejGn6IjJfL4usOuAVMng1DdyuRhXLGOcUvEblBcLZenrSjlkgS8ob1s3tbq3mo1FDxKhC…
28 "is-stream": "^2.0.0"
[all …]
/external/pigweed/pw_string/size_report/
Dformat_single.cc7 // https://www.apache.org/licenses/LICENSE-2.0
16 // printf-style string to a buffer. The number of bytes written is returned.
42 char* buffer = get_buffer_1; in OutputStringsToBuffer() local
46 // The code for using pw::string::Format is much simpler and safer. in OutputStringsToBuffer()
48 span(buffer, buffer_size), "hello %s %d", get_buffer_2, get_size) in OutputStringsToBuffer()
56 std::snprintf(buffer, buffer_size, "hello %s %d", get_buffer_2, get_size); in OutputStringsToBuffer()
58 buffer[0] = '\0'; in OutputStringsToBuffer()
62 return buffer_size - 1; in OutputStringsToBuffer()
/external/pigweed/pw_string/public/pw_string/
Dutil.h7 // https://www.apache.org/licenses/LICENSE-2.0
17 /// @brief The `pw::string::*` functions provide safer alternatives to
43 const size_t copied = source.copy(dest.data(), dest.size() - 1); in CopyToSpan()
57 /// a `string_view` does not require null-termination.
67 /// @brief `pw::string::NullTerminatedLength` is a safer alternative to
68 /// `strlen` for calculating the null-terminated length of the
71 /// Like `strnlen_s` in C11, the scan for the null-terminator is bounded.
77 /// .. pw-status-codes::
79 /// OK: Returns the null-terminated length of the string excluding the null
82 /// OUT_OF_RANGE: The string is not null-terminated.
[all …]
Dformat.h7 // https://www.apache.org/licenses/LICENSE-2.0
18 /// The `pw::string::Format` functions are safer alternatives to `std::snprintf`
35 /// Writes a printf-style formatted string to the provided buffer, similarly to
43 /// .. pw-status-codes::
46 /// terminator. The buffer is always null-terminated unless it is empty.
48 /// RESOURCE_EXHAUSTED: The buffer was too small to fit the output.
54 StatusWithSize Format(span<char> buffer, const char* format, ...);
56 /// Writes a printf-style formatted string with va_list-packed arguments to the
57 /// provided buffer, similarly to `std::vsnprintf()`.
61 StatusWithSize FormatVaList(span<char> buffer,
[all …]
/external/angle/build/config/
Dunsafe_buffers_paths.txt2 # Use of this source code is governed by a BSD-style license that can be
6 # -Wunsafe-buffer-usage in Clang).
10 # unix-style path separators. Directory prefixes should end with `/`, such
14 # Lines that begin with `-` name path prefixes that will *not* be checked for
15 # unsafe-buffer-usage. They are known to do unsafe things and should be
19 # Lines that begin with `+` name path prefixes that have no unsafe-buffer-usage
23 # By default, all files are checked for unsafe-buffer-usage unless they are
24 # match a `-` path prefix line here. If a file matches both a `-` and `+` line,
33 # Recommended process for removing a `-dir/` line from this file:
35 # 1. Remove the `-dir/` line from this paths file.
[all …]
/external/cronet/net/base/
Ddatagram_buffer.h2 // Use of this source code is governed by a BSD-style license that can be
15 // An IO buffer, (at least initially) specifically for use with the
23 // counting as in IOBuffers. The benefit is safer cancellation
52 // |buffer| to |buffers|. Caller retains owenership of |buffers| and |buffer|.
53 void Enqueue(const char* buffer, size_t buf_len, DatagramBuffers* buffers);
72 // |PostTask|. |Dequeue| is not expected to be thread-safe, so it
76 // cancellation (e.g. due to thread tear-down), the destructor will
94 void Set(const char* buffer, size_t buf_len);
/external/libpng/contrib/arm-neon/
Dlinux-auxv.c1 /* contrib/arm-neon/linux-auxv.c
3 * Copyright (c) 2014 Glenn Randers-Pehrson
10 * SEE contrib/arm-neon/README before reporting bugs
13 * BUG REPORTS: png-mng-implement@sourceforge.net
16 * /proc/self/auxv. This is probably faster, cleaner and safer than the code to
17 * read /proc/cpuinfo in contrib/arm-neon/linux, however it is yet another piece
34 /* A read call may be interrupted, in which case it returns -1 and sets errno to
42 char *buffer = png_voidcast(char*, buffer_in); in safe_read() local
59 iread = read(fd, buffer, nread); in safe_read()
61 if (iread == -1) in safe_read()
[all …]
/external/sg3_utils/include/
Dsg_pt_nvme.h5 * Copyright (c) 2017-2019 Douglas Gilbert.
7 * Use of this source code is governed by a BSD-style
10 * SPDX-License-Identifier: BSD-2-Clause
21 * is Copyright (c) 2011-2014, Intel Corporation. */
26 * structure. However what comes out in the data-in buffer (e.g. for the
29 * are exceptions, for example the EUI-64 identifiers in the Admin Identify
32 * Code online (e.g. nvme-cli at github.com) seems to favour packed
66 /* Using byte offsets and unaligned be/le copies safer than packed
140 uint32_t flags; /* OR-ed set of F_* flags */
145 /* Using byte offsets and unaligned be/le copies safer than packed
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/
DDownsampler.java80 …// 5MB. This is the max image header size we can handle, we preallocate a much smaller buffer but …
90 * Note - this method will throw an exception of a Bitmap with dimensions not matching
173 …// If we're rotating the image +-90 degrees, we need to downsample accordingly so the image width … in getRoundedSampleSize()
182 …// re-use Bitmaps, we mirror BitmapFactory's calculation here. For bug, see issue #224. For algori… in getRoundedSampleSize()
184 …l int powerOfTwoSampleSize = exactSampleSize == 0 ? 0 : Integer.highestOneBit(exactSampleSize - 1); in getRoundedSampleSize()
186 …// Although functionally equivalent to 0 for BitmapFactory, 1 is a safer default for our code than… in getRoundedSampleSize()
215 … // look at : https://groups.google.com/forum/#!msg/android-developers/Mp0MFVFi1Fo/e8ZQ9FGdWdEJ in shouldUsePool()
240 … // We probably only need 25, but this is safer (particularly since the buffer size is > 1024). in getConfig()
295 …// the possibility of not being able to fit enough of the header in the buffer to get the image si… in decodeStream()
296 … // that we don't fail to load images. The BufferedInputStream will create a new buffer of 2x the in decodeStream()
[all …]
/external/cldr/tools/scripts/tr-archive/
Dpackage-lock.json2 "name": "tr-archive",
8 "name": "tr-archive",
10 "license": "Unicode-3.0",
12 "@not-dalia/gfm-toc": "github:not-dalia/gfm-toc",
13 "anchor-js": "^5.0.0",
17 "marked-alert": "^2.0.1"
20 "node_modules/@not-dalia/gfm-toc": {
22 …"resolved": "git+ssh://git@github.com/not-dalia/gfm-toc.git#68f2db628606366b51b51a071c8bb87f490575…
25 "escape-html": "^1.0.3",
30 "gfm-toc": "bin/gfm-toc"
[all …]
/external/vboot_reference/firmware/2lib/include/
D2common.h2 * Use of this source code is governed by a BSD-style license that can be
20 * required buffer size, so can't be turned into a static inline function.
31 /* Debug output printf() for tests. Otherwise, it's platform-dependent. */
43 * Alignment for work buffer pointers/allocations should be useful for any
45 * use explicit alignment to avoid run-time errors. For example:
59 /* Work buffer */
66 * Initialize a work buffer.
68 * @param wb Work buffer to init
69 * @param buf Pointer to work buffer data
70 * @param size Size of work buffer data in bytes
[all …]
/external/aws-sdk-java-v2/core/sdk-core/src/main/java/software/amazon/awssdk/core/
DBytesWrapper.java35 …* different types, like a byte buffer (via {@link #asByteBuffer()}, or a string (via {@link #asUtf…
53 * @return The output as a read-only byte buffer.
72 …* <p>Consider using {@link #asByteBuffer()}, which is a safer method to avoid an additional array …
73 …* provide a way to modify the underlying buffer. As the method name implies, this is unsafe. If yo…
96 * @return The output as a utf-8 encoded string.
97 …ption with a {@link CharacterCodingException} as the cause if the bytes cannot be encoded as UTF-8.
/external/google-breakpad/src/common/windows/
Dstring_utils-inl.h29 // string_utils-inl.h: Safer string manipulation on Windows, supporting
30 // pre-MSVC8 environments.
42 // but "I64" can be used to print 64-bit types. Don't use "I64" where "ll"
54 // behaves as a standards-confirming swprintf should, so force the use of
71 // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does
73 // buffer is always 0-terminated.
78 // be passed directly, and pre-MSVC8, this will not fail if source or count
79 // are longer than destination_size. The destination buffer is always
80 // 0-terminated.
84 // Performs multi-byte to wide character conversion on C++ strings, using
[all …]
/external/skia/include/private/base/
DSkMalloc.h4 * Use of this source code is governed by a BSD-style license that can be
31 * If this bit is set, the returned buffer must be zero-initialized. If this bit is not set
32 * the buffer can be uninitialized.
43 * Return a block of memory (at least 4-byte aligned) of at least the specified size.
45 * on the SK_MALLOC_THROW bit. If the allocation succeeds, the memory will be zero-initialized
54 * If size is 0, it will call sk_free on buffer and return null. (This behavior is implementation-
57 SK_API extern void* sk_realloc_throw(void* buffer, size_t size);
88 SK_API extern void* sk_realloc_throw(void* buffer, size_t count, size_t elemSize);
104 // bzero is safer than memset, but we can't rely on it, so... sk_bzero()
105 static inline void sk_bzero(void* buffer, size_t size) { in sk_bzero() argument
[all …]
/external/skia/tools/perf-canvaskit-puppeteer/
Dpackage-lock.json2 "name": "perf-canvaskit-puppeteer",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz",
10 …"integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvX…
15 "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz",
16 …"integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0…
24 "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
25 …"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwa…
27 "mime-types": "~2.1.34",
31 "agent-base": {
33 "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
[all …]
/external/perfetto/src/traced/probes/android_log/
Dandroid_log_data_source.h8 * http://www.apache.org/licenses/LICENSE-2.0
56 // One EventFormat == one line of /system/etc/event-log-tags.
73 // Reads the contents of /system/etc/event-log-tags. Virtual for testing.
91 // Parses one line of /system/etc/event-log-tags.
98 // - If the event is skipped due to filters, |out_evt| is left unset.
99 // - If a new event is aded to the packet, |out_evt| is set to that.
105 // Parses a binary event from the "events" buffer.
108 // - If the event is skipped due to filters, |out_evt| is left unset.
109 // - If a new event is aded to the packet, |out_evt| is set to that.
129 // /system/etc/event-log-tags when starting.
[all …]
/external/python/cpython3/Include/internal/
Dpycore_fileutils.h50 /* On Windows, the count parameter of read() is an int (bpo-9015, bpo-9611).
52 fail with EINVAL (bpo-24658). */
57 but it's safer to do it ourself to have a portable behaviour */
128 /* Number of characters of 'buf' buffer
137 /* Number of characters of 'resolved_path' buffer
144 /* Number of characters of 'buf' buffer
174 ((LEN) == (size_t)-2) \
251 // invalid parameter (bpo-23524). IPH stands for Invalid Parameter Handler.
/external/skia/tools/run-wasm-gm-tests/
Dpackage-lock.json2 "name": "run-wasm-gm-tests",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.8.tgz",
10 …"integrity": "sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxc…
15 "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz",
16 …"integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0…
24 "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
25 …"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwa…
27 "mime-types": "~2.1.34",
31 "mime-db": {
33 "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
[all …]
/external/wpa_supplicant_8/src/wps/
Dwps.c2 * Wi-Fi Protected Setup
3 * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
30 * wps_init - Initialize WPS Registration protocol data
44 data->wps = cfg->wps; in wps_init()
45 data->registrar = cfg->registrar; in wps_init()
46 if (cfg->registrar) { in wps_init()
47 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init()
49 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init()
50 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init()
52 if (cfg->pin) { in wps_init()
[all …]
/external/skia/modules/canvaskit/npm_build/
Dpackage-lock.json2 "name": "canvaskit-wasm",
8 "name": "canvaskit-wasm",
10 "license": "BSD-3-Clause",
12 "@definitelytyped/header-parser": "0.0.121",
18 "node_modules/@definitelytyped/header-parser": {
20 …"resolved": "https://registry.npmjs.org/@definitelytyped/header-parser/-/header-parser-0.0.121.tgz…
21 …"integrity": "sha512-78HY1J+QiwZPXFZQWb9gPQPxAMNg6/1e4gl7gL/8dmd17vVWLi3AGrLJoG8Pn1p8d7MF2rlPw/2AE…
24 "@definitelytyped/typescript-versions": "^0.0.121",
29 "node_modules/@definitelytyped/typescript-versions": {
31 …ed": "https://registry.npmjs.org/@definitelytyped/typescript-versions/-/typescript-versions-0.0.12…
[all …]
/external/cronet/net/third_party/quiche/src/quiche/quic/core/http/
Dweb_transport_stream_adapter.cc2 // Use of this source code is governed by a BSD-style license that can be
36 absl::Span<char> buffer) { in Read() argument
38 iov.iov_base = buffer.data(); in Read()
39 iov.iov_len = buffer.size(); in Read()
40 const size_t result = sequencer_->Readv(&iov, 1); in Read()
41 if (!fin_read_ && sequencer_->IsClosed()) { in Read()
43 stream_->OnFinRead(); in Read()
45 return ReadResult{result, sequencer_->IsClosed()}; in Read()
50 const size_t old_size = output->size(); in Read()
52 output->resize(old_size + bytes_to_read); in Read()
[all …]
/external/erofs-utils/include/erofs/
Dflex-array.h1 /* SPDX-License-Identifier: GPL-2.0 */
19 * flex-array.h
23 * Flex-arrays:
24 * - Flex-arrays became standard in C99 and are defined by "array[]" (at the
26 * - Pre-C99 flex-arrays can be accomplished by "array[1]"
27 * - There is a GNU extension where they are defined using "array[0]"
36 * changed from gnu89 to gnu11. In jgmenu, CFLAGS therefore contains -std=gnu89
38 * gcc -dM -E - </dev/null | grep '__STDC_VERSION__\|__STDC__'
40 * The code below is copied from git's git-compat-util.h in support of
56 /* Otherwise, default to safer but a bit wasteful traditional style */
[all …]
/external/okio/kotlin-js-store/
Dyarn.lock7 …resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5…
8 …integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9…
10 "@discoveryjs/json-ext@^0.5.0":
12 …resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b770…
13 …integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iP…
15 "@jridgewell/gen-mapping@^0.3.0":
17 …resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df…
18 …integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9…
20 "@jridgewell/set-array" "^1.0.1"
21 "@jridgewell/sourcemap-codec" "^1.4.10"
[all …]
/external/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_texture.c20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
58 #include "drm-uapi/drm_fourcc.h"
70 * Conventional allocation path for non-display textures:
78 struct pipe_resource *pt = &lpr->base; in llvmpipe_texture_layout()
79 unsigned width = pt->width0; in llvmpipe_texture_layout()
80 unsigned height = pt->height0; in llvmpipe_texture_layout()
81 unsigned depth = pt->depth0; in llvmpipe_texture_layout()
83 unsigned layers = pt->array_size; in llvmpipe_texture_layout()
88 * non-buffer resources. Otherwise we'd want the max of cacheline size and in llvmpipe_texture_layout()
93 uint64_t mip_align = MAX2(64, util_get_cpu_caps()->cacheline); in llvmpipe_texture_layout()
[all …]

12345678