Benign lua Download

carray 0.0.4-1

“Arrays for primitive numeric C data types”

Basename is uppercase README.mdGitHub Actions workflow definition path
SHA-256c6dd856fe0e12e1aa423bc2e4dca6f065a75aee47cca40070f959b043f1b1838

Evidence

Lua C API string push call carray.c · lines 394–402
394:52… 1;
395 lua_pushlstring(L, ptr, count);
396 } else {
397 lua_pushstring(L, "");
398 }
399 return 1;
400}
401
402/* ============================================================================================ …
Copies bytes with native memcpy carray.c · lines 630–645
630:108… STRING)
631 {
632 size_t len = 0;
633 const char* str = lua_tolstring(L, a, &len);
634 if (len > 0) {
635 if (i + len > count) {
636 return luaL_argerror(L, a, "index out of bounds");
637 }
638 memcpy(ptr + i, str, len);
639 i += len;
640 }
⋯5 lines
References C fopen file-open API carray.c · lines 1318–1324
1318:48… id file");
1319 }
1320 }
1321 else if (fname) {
1322 file = fopen(fname, "rb");
1323 if (!file) {
1324 return luaL_argerror(L, arg, lua_pushfstring(L, "cannot open file: %s", fname)); …
Calls native buffer or string comparison API carray.c · lines 1411–1416
1411:47… udata2->elementCount
1412 && (dataLength == 0 || memcmp(udata1->buffer, udata2->buffer, dataLength) == 0));
1413 return 1;
1414}
1415
1416/* ======================================================= …
Shell changes working directory activate.sh · lines 1–21
1# Activations script for add the carray module to the lua path when
2# building carray using the Makefile.
3# Source this into interactive shell by invoking ". activates.sh" from this directory
4# This is not necessary if carray is installed, e.g. via luarocks.
5
6this_dir=$(pwd)
7
8luacarray_dir=$(cd "$this_dir"/..; pwd)
9
10if [ ! -e "$luacarray_dir/src/activate.sh" -o ! -e "$luacarray_dir/src/main.c" ]; then
11
12 echo '**** ERROR: ". activate.sh" must be invoked from "src" directory ***'
⋯9 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.