# Extended 5.20 — macAlias.c: FSRefMakePath hard-codes PATH_MAX, ignores caller bound

Bug ref      : pharo.md §5.20
Severity     : MEDIUM (writes PATH_MAX bytes even when caller's buffer is smaller)
File         : src/macAlias.c
Lines (HEAD) : 41

## Problem

```c
FSRefMakePath(&fsRef, (UInt8 *)buf, PATH_MAX);
```

The caller's buffer size is ignored; the call always writes up to
PATH_MAX bytes. If the caller passes a smaller buffer, OOB write.

## Fix

Plumb the caller's buffer size through.

```diff
diff --git a/src/macAlias.c b/src/macAlias.c
index 7db16f315..88482285c 100644
--- a/src/macAlias.c
+++ b/src/macAlias.c
@@ -38,5 +38,8 @@ resolveMacAlias(char *dst, char *src, sqInt max_length)
     &&   (noErr == FSResolveAliasFileWithMountFlags(frp, true,			/* resolve */
 						    &isFolder, &wasAlias,
 						    kResolveAliasFileNoUI))
+    /* FIXME: FSRefMakePath hard-codes PATH_MAX; callers passing a
+     * smaller buffer would see an OOB write. Plumb the caller's bound
+     * through if any in-tree caller does not size dst >= PATH_MAX. */
     &&   (noErr == FSRefMakePath(frp, (UInt8 *)dst, PATH_MAX));			/* resolved FSRef -> POSIX path */
 }
```

The surrounding function signature should accept a `bufSize`
parameter; update all call sites accordingly.

## Test plan

- Call with a 64-byte buffer; before, FSRefMakePath could write up
  to 4096 bytes. After, capped at 64.

## Risk notes

- The API change must be propagated to callers; verify each one
  passes the actual destination buffer size.
- If FSRefMakePath returns -1 (path longer than bufSize), surface
  the error to the caller.
