Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/1194827/?format=api
https://translate-dev.freebsd.org/api/translations/documentation/booksdevelopers-handbooksecure_index/fa/?format=api", "source": [ "The most straightforward solution to the problem of stack-overflows is to always use length restricted memory and string copy functions. `strncpy` and `strncat` are part of the standard C library. These functions accept a length value as a parameter which should be no larger than the size of the destination buffer. These functions will then copy up to 'length' bytes from the source to the destination. However there are a number of problems with these functions. Neither function guarantees NUL termination if the size of the input buffer is as large as the destination. The length parameter is also used inconsistently between strncpy and strncat so it is easy for programmers to get confused as to their proper usage. There is also a significant performance loss compared to `strcpy` when copying a short string into a large buffer since `strncpy` NUL fills up the size specified." ], "previous_source": "", "target": [ "سادهترین راهحل برای مشکلات سرریزی پشته این است که همیشه از حافظه محدود و توابع کپی کردن رشته استفاده کنید. توابع <function>strncpy</function> و <function>strncat</function> بخشی از کتابخانهٔ استاندارد C هستند. <_:indexterm-1/> <_:indexterm-2/> این توابع یک مقدار طول بهعنوان پارامتر دریافت میکند که نباید بزرگتر از اندازهٔ میانگیر مقصد باشد. این توابع سپس به اندازهٔ آن مقدار بایت از مبدأ به مقصد کپی میکنند. با این حال این توابع هم مشکلاتی دارند. هیچ کدام پایاندهی NUL را در صورتی که اندازه میانگیر ورودی به بزرگی خروجی <_:indexterm-3/> باشد تضمین نمیکنند. همچنین پارامتر طول بین strncpy و strncat به یک شکل استفاده نمیشود، از این رو برنامهنویسان در خصوص استفاده درست آنها به سادگی گیج میشوند. همچنین به نسبت <function>strcpy</function> از دست دهی عملکرد قابل توجهی بههنگام کپی کردن یک رشته کوتاه به یک میانگیر بزرگ وجود دارد، چرا که NUL مختص به <function>strncpy</function> کل اندازه مشخص شده را پر میکند." ], "id_hash": -4657702395399893570, "content_hash": -4657702395399893570, "location": "documentation/content/en/books/developers-handbook/secure/_index.adoc:174", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 37, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 146, "source_unit": "https://translate-dev.freebsd.org/api/units/1194754/?format=api", "priority": 100, "id": 1194827, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksdevelopers-handbooksecure_index/fa/?checksum=3f5c845954b40dbe", "url": "https://translate-dev.freebsd.org/api/units/1194827/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-06-08T11:36:30.557974Z" }{ "translation": "