I just completed a similar project where cat urine had soaked through carpet into the OSB subfloor in a bedroom which ran underneath an exterior wall. I cut the subfloor as close to the wall as I could but the remaining stub of OSB still smelled. A few nights of research convinced me that replacing the remaining OSB under the wall would be nearly impossible. Recommendations were to saturate it with BIN 1-2-3 pigmented shellac primer to seal in the odor. I was expecting a heavy coating, but the BIN is about as thick as whole milk and the porous OSB drank it right up. I put several coats on every bit of the exposed OSB, the exposed wall framing under the drywall, and also 6" up the drywall which had wicked up some of the urine. It took 7 coats until the smell was mostly gone. If followed up with 3 coats of Kilz MAX water-based primer (avoided oil-based due to pregnant wife in the house) over the BIN primed areas and up the entire wall, which I realized was still emitting odor. The Kilz went on thicker and was more effective at sealing in the odor by the 3rd coat. For the unsupported subfloor edge, I built a "bridge" between the last I-joist and the wall ledger, loosely based on ideas in another thread on this website. Search "How do I replace a sub-floor that goes under a wall" and you'll find it.
(Top) This is the section I had to cut out.
(Bottom Left) The ledger board was 2" beyond the OSB cut and there was only 7.5" between it and the first I-joist, not enough room to swing a hammer to fasten joist hangers or anything else. I sistered a 2x12 with StrongDrive 1/4 x 3 wood screws (using a Dewalt right-angle drill attachment) and some P&L, after first fastening 2x10 cleats with 16d nails, leaving just enough room for a piece of 2x between the top of the cleats and the OSB.
(Bottom Right) For the I-joist, I ripped a 2x10 to squeeze in snug against the web between the two flanges. I fastened vertical lengths of 2x4 flush with the top of the 2x10 using 3" SPAX structural screws, then fastened the completed piece against the web with 1/2 stainless hex bolts.
(Left) I then cut more 2x4 pieces to bridge across the 2x members and screwed them down using cheapo 2.5" wood screws and P&L. The bridge pieces fit snug under the existing OSB cut edge.
(Top Right) I cut a new piece of OSB to fit which joined the T&G in the uncut floor board to it's right. The bridge provided flush support where it joined the wall edge.
(Bottom Right) I cut and fitted the 2nd board, then glued and screwed everything down. It feels solid as a rock and I'm confident it will support the hardwoods going in this week. As mentioned, I followed up with 3 coats of Kilz Max on the entire back wall and used the rest of the can to coat the entire floor, so that if anything manages to seep through the new hardwoods and the vapor barrier the OSB hopefully won't drink it up like a sponge again.