<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/rockdaboot">Tim Rühsen</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_790348720">discussion</a>:
</p>
<div style="">
<p dir="auto">Yeah, I get this. And I agree with that comment in regards to application code. Though it needs to take special care as "not a constant" may also overflow (or at least stress) the amount of RAM that you have.</p>
<p dir="auto">And IMO, for library code the pros and cons listed are still valid.</p>
<p dir="auto">So I wonder if we should discuss other possibilities as well, like supporting only a defined upper path length of e.g. 4095 bytes (excl. 0-byte). This would allow either stack allocation or careful pre-allocation during init phase.</p>
<p dir="auto">An alternative would be a macro that does stack allocation if path length < 4096, else fall back to heap allocation. A MALLOC and a FREE macro could be used to hide the details.</p>
<p dir="auto">Maybe you have other ideas ? And 4096 is just an arbitrary values - it could as well be 1024 or 512, as we likely never see such path length in reality.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_790348720">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/6be3b1d417bc5097d00c69fa1e12c051/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_790348720"}}</script>


</p>
</div>
</body>
</html>